Monday, November 29, 2021

Steps to add ExaCS ExaCC Storage servers in to Oracle Enterprise Manager (OEM)

Introduction:

Oracle Enterprise Manager Cloud Control provides a complete cloud lifecycle management solution for Oracle Database Exadata Cloud Service (ExaCS) and Oracle Database Exadata Cloud at Customer (ExaCC). In this Blog, we will see step by step to add ExaCS Storage servers into OEM Monitoring. Same steps are applicable for ExaCC.

Prerequisites:

1. Agent is already deployed in ExaCS nodes.

2. Exadata Plugin is available in OMS and Agents.

3. ExaCS VM Nodes, DB, ASM targets are added into Monitoring.

Steps:

To associate the storage servers of the grid infrastructure with the cloud target, we need to create an EM named credential for storing the ExaCLI username and password used for connecting to the Exadata Storage Server. Follow step1 and 2 to get username and password.

 1) Get ExaCLI Username:

      Username is in the format cloud_user_<clustername>

      Obtain clustername from the ExaCS VM.      

       As grid user run  "crsctl get cluster name".  The output is shown as below.

[grid@exaash-XXXXXX ~]$ crsctl get cluster name

CRS-6724: Current cluster name is 'cl-27XXXXca-16b'

The ExaCLI user name is cloud_user_cl-27XXXXca-16b

2) Get ExaCLI Password:

As root user run this script "/opt/exacloud/get_cs_data.py" in ExaCS first node.

#cd /opt/exacloud/

#./get_cs_data.py

The output is shown below.

ExaCli initial password is:

XXXXXXXXXXXX

3) Create ExaCLI Named credential in OEM

       1. Click the setup icon > click Security > select Named Credentials. The Named Credentials page is displayed.

       2. Click Create. The Create Credential page opens.

       3. Provide the following information: (screen shot below).

  • Credential Name: Provide a suitable name to the credential. For example, EXADATA_CRED.
  • Credential Description: Describe the purpose of the credential and the intended use.
  • Authenticating Target Type: Specify the target type for which this credential set will be used for authentication. Select Oracle Exadata Storage Server from the menu.
  • Credential Type: Specify the type of the credential that you're creating. Select Credential for ExaCLI or RESTful API from the menu.
  • Scope: Select the visibility of the credential in Enterprise Manager. Select Global.
  • Username and Password: Provide the user name and password to access the storage cells which we generated in Step1 and 2.
  • Click Save.

You can now view the new credential created in the Named Credentials page.

Oracle Database, Oracle Database Certification, Oracle Database Preparation, Oracle Database Guides, Oracle Database Study

4. We need to create a configuration file in OMS server with the following information,  which will be used to discover the storage servers using Emcli.

Example: we create a file named $OMS_HOME/bin/exacs1.txt with the below content.

configMap.targetName=ExaCS1
configMap.region=Ashburn
configMap.tenancy=DevOCI
configMap.serviceType=ExaCS
configMap.monitorAgentUrl.0=https://exacs-xxxxx1.exacs1.corp.oraclevcn.com:3872/emd/main/
credMap.cellCredSet=SYSMAN:ExaCS_Storage_Cred
host.name.0=exacs-xxxxx1.exacs1.corp.oraclevcn.com
host.name.1=exacs-xxxxx2.exacs1.corp.oraclevcn.com
  • configMap.targetName: Name of the target that you want to create
  • configMap.region: The cloud region where the target is created
  • configMap.tenancy: The tenancy where the cloud target is created
  • configMap.serviceType: Specify ExaCC if the service type is Oracle Database Exadata Cloud at Customer, or ExaCS if the service type is Oracle Database Exadata Cloud Service
  • configMap.monitorAgentUrl.0: The URL of the agent which will be used to monitor the new target. You can obtain this from the agent home page or run the following command to get the agent URL:
  • emcli status agent
  • credMap.cellCredSet: The credential set that we created earlier, which is used to discover the storage servers in the new cloud target. In the above example, SYSMAN is the owner of the credential and EXADATA_CRED is the name of the credential.
    • To obtain the credential set information, click the setup icon > click Security > select Named Credentials. The Named Credentials page is displayed. Collect the required information about the credential set in this page. See Step 3.
  • host.name.x: The host names on which the databases that must be associated with the new cloud target, are run. Specify all the host names for the discovery to complete successfully. Here, x is the host name number which should start with 0, and must be incremented by 1 for every additonal host name added to the file.
5. Run the emcli command in OMS server as oracle user.

cd $OMS_HOME/bin

#./emcli submit_procedure -name=ExaCloudServiceDiscovery -input_file=data:exacs1.txt -notification="scheduled, action required, running" ;

6. Monitor the discovery status in OEM

You can view the status of the discovery in the Procedure Activity page. Go to Enterprise Manager Home page > click the Enterprise icon > click Provisioning and Patching. The following Procedure Activity page is displayed:

Oracle Database, Oracle Database Certification, Oracle Database Preparation, Oracle Database Guides, Oracle Database Study

7. If Storage servers are not discovered, follow this workaround:

Go to ExaCS Node1, take a backup and edit below Perl script:

<Agent_Home>/plugins/oracle.sysman.xa.discovery.plugin_*/discover/csCellDiscovery.pl

Example:/u01/app/oem/agent_13.4.0.0.0/plugins/oracle.sysman.xa.discovery.plugin_*/discover/csCellDiscovery.pl 

Find the line below 
my $exaclicommand = "exacli -l $username -c ".$ip." --xml -e \"list cell attributes name\"";
 
and Replace exacli with /usr/local/bin/exacli 

The line will then look similar to this one below

my $exaclicommand = "/usr/local/bin/exacli  -l $username -c ".$ip." --xml -e \"list cell attributes name\"";

8. In OMS server, run the following command to delete the ExaCS target. 

#./emcli delete_target -name="<target_name>" -type="oracle_exadata_cloud_service" 

9. Perform step 5 again and check the status as outlined in step 6.

10. Explore the Cloud Target Home Page

After the discovery is complete, visit the cloud target home page and explore the various views in EM.

Go to Enterprise Manager Home > click the Targets icon > click Exadata.

You will see the ExaCS Targets including Storage servers as below.

Oracle Database, Oracle Database Certification, Oracle Database Preparation, Oracle Database Guides, Oracle Database Study

Source: oracle.com

Related Posts

0 comments:

Post a Comment