Introduction

I wrote this article to show how you can integrate Legacy OEM with your Cloud environment in this case Oracle ExaCC.To have overall view on your Exadata X9M Cloud Infrastructure, statistics related to CPU/Memory/ASM Storage usage. Your on premise monitoring OEM can read data from Oracle cloud using OCI libraries and present them in combination with your standard DB/VMs target monitoring, this give you powerful tool for overall view on your Enterprise environment.

Since version OEM release update 13.5.0.23 of OMS / Agents. There is few new interesting Dashboards and panels related to OCI Exadata Infrastructure, also RU23 introduces the Oracle Enterprise Manager Cloud Control Exadata Management Pack and Zero Data Loss Recovery Appliance (ZDLRA) Management Pack, some Dashboards, panels view below:

Biggest advantage of this integration is that you will have wider view to your cloud environment, Concept of ExaCC is that you see and have access to VMs and databases, hardware of Exadata Dbservers and Cellservers are normally managed by Oracle.

Adding this OCI integration to OEM give you viasability of physical cell servers and their statistics.

Now lets move on how this can be configured

Prerequisites:

  1. OEM OMS/Agents update to minimum 13.5.0.23 (AUG 07/2024), why? since this version there is OCI integration enhancements and new dashboards,management packs for ExaCC. I described this in another post link here: https://www.dbi-services.com/blog/oem-cloud-control-release-update-to-13-5-0-23
  2. Get your Exacli user/password to cellservers from your environment , in procedure I will describe how to do it
  3. Have OCI client/libraries installed on one of Agents host.
  4. Have access to OCI directly or over HTTPS proxy from Agent host.

Step by Step Procedure:

Get Exacli username and password to your ExaCC cellservers(this step is optional but recommend to have more statistics from cell servers.

Login to one of yours Virtual Exadata vm server and check username and password for StorageCells.

username usually have format: cloud_user_<crs_cluster_name>

to get clustername and password ,login as grid user end execute:

[grid@s***n1 ~]$ crsctl get cluster name; 
CRS-6724: Current cluster name is 'zh1234clua1' 

#so in this case username will be cloud_user_zh1234clua1

#now get Exadata initial password
[opc@s***n1 ~]$ sudo su - 
[root@s***n1 ~]# /opt/exacloud/get_cs_data.py 
*** WARNING : deprecated key derivation used. 
Using -iter or -pbkdf2 would be better. 
ExaCli initial password is: 
 **************************** 


#Collect the storage server IP address from 
/etc/oracle/cell/network-config/cellip.ora on the VM Guest. 

#Test Connection to one of cell IP addresses 
#using exacli provide username and password gathered above 
exacli -l cloud_user_zh1234clua1 -c 100.100.0.13 -e list physicaldisk 
Password: **************************** 

#in output you should receive disk list from Storage cell , if not then means that your username or passwords are incorrect.

Save credentials for later.

Create new named credentials in OEM:

Go to Setup > Security > Named Credentials and create new with user and passwords saved above:

Now we have connection between OEM and storage Cellservers.

Create user/group/policy for monitoring and assign proper policy’s in OCI.

Login to OCI and create new user,group and policys

Go to Identity > Domains > Groups and create new (use name which apply to your naming convention

Create New user and attache to Group created earler:

Create API keys:

Copy OCI configuration config file and save ssh key.

Create new policy with 2 Statements (privileges to be able to read your compartment objects) like below:

Go to Identity & Security > Policies

Download and install OCI Client on your server.

In our case, we installing OCI on OMS server and use EM Agent deployed to this machine. To use OCI API to connect and gather data from Oracle Cloud about our infrastructure using HTTPS_PROXY server.

To install OCI please follow official documentation, there are different options of installation and OS versions: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#InstallingCLI__oraclelinux8

In our case we installing OCI Cli as oracle user on Oracle Linux 8

First we set http/s proxy :

oracle@agent1:~/ export HTTPS_PROXY=http://proxy.proxy.com:3038 
oracle@agent1:~/ export HTTP_PROXY=http://proxy.proxy.com:3038 

Download newest OCI libraries :

oracle@agent1:~/# mkdir -p /u01/app/oracle/oci/
oracle@agent1:~/# cd  /u01/app/oracle/oci/
oracle@agent1:/u01/app/oracle/oci/# bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" 

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current 
                                 Dload  Upload   Total   Spent    Left  Speed 
100 16926  100 16926    0     0   199k      0 --:--:-- --:--:-- --:--:--  199k 
    ****************************************************************************** 
    You have started the OCI CLI Installer in interactive mode. If you do not wish 
    to run this in interactive mode, please include the --accept-all-defaults option. 
    If you have the script locally and would like to know more about 
    input options for this script, then you can run: 
    ./install.sh -h 
    If you would like to know more about input options for this script, refer to: 
    https://github.com/oracle/oci-cli/blob/master/scripts/install/README.rst 
    ****************************************************************************** 
Downloading Oracle Cloud Infrastructure CLI install script from https://raw.githubusercontent.com/oracle/oci-cli/v3.2.1/scripts/install/install.py to /tmp/oci_cli_install_tmp_VwnM. 
######################################################################################################################################################################### 100.0% 
Running install script. 
python3 /tmp/oci_cli_install_tmp_VwnM 
-- Verifying Python version. 
-- Python version 3.6.8 okay. 
===> In what directory would you like to place the install? (leave blank to use '/home/oracle/lib/oracle-cli'): 
-- Creating directory '/home/oracle/lib/oracle-cli'. 
-- We will install at '/home/oracle/lib/oracle-cli'. 
===> In what directory would you like to place the 'oci' executable? (leave blank to use '/home/oracle/bin'): 
-- Creating directory '/home/oracle/bin'. 
-- The executable will be in '/home/oracle/bin'. 
===> In what directory would you like to place the OCI scripts? (leave blank to use '/home/oracle/bin/oci-cli-scripts'): 
-- Creating directory '/home/oracle/bin/oci-cli-scripts'. 
-- The scripts will be in '/home/oracle/bin/oci-cli-scripts'. 
===> Currently supported optional packages are: ['db (will install cx_Oracle)'] 
What optional CLI packages would you like to be installed (comma separated names; press enter if you don't need any optional packages)?: 
-- The optional packages installed will be ''. 
-- Trying to use python3 venv. 
-- Executing: ['/usr/bin/python3', '-m', 'venv', '/home/oracle/lib/oracle-cli'] 
-- Executing: ['/home/oracle/lib/oracle-cli/bin/pip', 'install', '--upgrade', 'pip'] 
Collecting pip 
  Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB) 
    100% |████████████████████████████████| 1.7MB 847kB/s 
Installing collected packages: pip 
  Found existing installation: pip 9.0.3 
    Uninstalling pip-9.0.3: 
      Successfully uninstalled pip-9.0.3 
Successfully installed pip-21.3.1 
You are using pip version 21.3.1, however version 24.2 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 
-- Executing: ['/home/oracle/lib/oracle-cli/bin/pip', 'install', '--cache-dir', '/tmp/tmpk9na7c02', 'wheel', '--upgrade'] 
Collecting wheel 
  Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB) 
Installing collected packages: wheel 
Successfully installed wheel-0.37.1 
-- Executing: ['/home/oracle/lib/oracle-cli/bin/pip', 'install', '--cache-dir', '/tmp/tmpk9na7c02', 'oci_cli', '--upgrade'] 
Collecting oci_cli 
  Downloading oci_cli-3.48.0-py3-none-any.whl (50.7 MB) 
     |████████████████████████████████| 50.7 MB 2.6 MB/s 
Collecting jmespath==0.10.0 
  Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB) 
Collecting prompt-toolkit==3.0.29 
  Downloading prompt_toolkit-3.0.29-py3-none-any.whl (381 kB) 
     |████████████████████████████████| 381 kB 51.8 MB/s 
Collecting arrow>=1.0.0 
  Donloading arrow-1.2.3-py3-none-any.whl (66 kB) 
     |████████████████████████████████| 66 kB 14.0 MB/s 
Collecting PyYAML<=6.0.1,>=5.4 
  Downloading PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (677 kB) 
     |████████████████████████████████| 677 kB 47.5 MB/s 
Collecting oci==2.134.0 
  Downloading oci-2.134.0-py3-none-any.whl (27.9 MB) 
     |████████████████████████████████| 27.9 MB 96.5 MB/s 
Collecting terminaltables==3.1.10 
  Downloading terminaltables-3.1.10-py2.py3-none-any.whl (15 kB) 
Collecting certifi 
  Downloading certifi-2024.8.30-py3-none-any.whl (167 kB) 
     |████████████████████████████████| 167 kB 106.3 MB/s 
Collecting cryptography<43.0.0,>=3.2.1 
  Downloading cryptography-40.0.2-cp36-abi3-manylinux_2_28_x86_64.whl (3.7 MB) 
     |████████████████████████████████| 3.7 MB 25.3 MB/s 
Collecting six>=1.15.0 
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) 
Collecting pyOpenSSL<25.0.0,>=17.5.0 
  Downloading pyOpenSSL-23.2.0-py3-none-any.whl (59 kB) 
     |████████████████████████████████| 59 kB 18.3 MB/s 
Collecting python-dateutil<3.0.0,>=2.5.3 
  Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB) 
     |████████████████████████████████| 229 kB 61.2 MB/s 
Collecting pytz>=2016.10 
  Downloading pytz-2024.2-py2.py3-none-any.whl (508 kB) 
     |████████████████████████████████| 508 kB 99.2 MB/s 
Collecting click==8.0.4 
  Downloading click-8.0.4-py3-none-any.whl (97 kB) 
     |████████████████████████████████| 97 kB 19.2 MB/s 
Collecting importlib-metadata 
  Downloading importlib_metadata-4.8.3-py3-none-any.whl (17 kB) 
Collecting circuitbreaker<2.0.0,>=1.3.1 
  Downloading circuitbreaker-1.4.0.tar.gz (9.7 kB) 
  Preparing metadata (setup.py) ... done 
Collecting wcwidth 
  Downloading wcwidth-0.2.13-py2.py3-none-any.whl (34 kB) 
Collecting typing-extensions 
  Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB) 
Collecting cffi>=1.12 
  Downloading cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (402 kB) 
     |████████████████████████████████| 402 kB 30.7 MB/s 
Collecting pycparser 
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB) 
     |████████████████████████████████| 118 kB 89.7 MB/s 
Collecting zipp>=0.5 
  Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB) 
Building wheels for collected packages: circuitbreaker 
  Building wheel for circuitbreaker (setup.py) ... done 
  Created wheel for circuitbreaker: filename=circuitbreaker-1.4.0-py3-none-any.whl size=7506 sha256=cd24462c8ab8bb71fba04fa996852c0cff6c93749f3a2c74591f3a1cbfa756ec 
  Stored in directory: /tmp/tmpk9na7c02/wheels/46/17/98/db2eb826e4a98da672cffe66ec16838182cde0cf19ad2c0c70 
Successfully built circuitbreaker 
Installing collected packages: pycparser, cffi, zipp, typing-extensions, six, cryptography, wcwidth, pytz, python-dateutil, pyOpenSSL, importlib-metadata, circuitbreaker, certifi, terminaltables, PyYAML, prompt-toolkit, oci, jmespath, click, arrow, oci-cli 
Successfully installed PyYAML-6.0.1 arrow-1.2.3 certifi-2024.8.30 cffi-1.15.1 circuitbreaker-1.4.0 click-8.0.4 cryptography-40.0.2 importlib-metadata-4.8.3 jmespath-0.10.0 oci-2.134.0 oci-cli-3.48.0 prompt-toolkit-3.0.29 pyOpenSSL-23.2.0 pycparser-2.21 python-dateutil-2.9.0.post0 pytz-2024.2 six-1.16.0 terminaltables-3.1.10 typing-extensions-4.1.1 wcwidth-0.2.13 zipp-3.6.0 

===> Modify profile to update your $PATH and enable shell/tab completion now? (Y/n): n 

-- If you change your mind, add 'source /home/oracle/lib/oracle-cli/lib/python3.6/site-packages/oci_cli/bin/oci_autocomplete.sh' to your rc file and restart your shell to enable tab completion. 

-- You can run the CLI with '/home/oracle/bin/oci'. 

-- Installation successful. 

-- Run the CLI with /home/oracle/bin/oci --help 

Configure credenials to OCI user and copy API private key to host:

oracle@agent1:~/# vi .oci/config 
[DEFAULT] 
user=ocid1.user.ooracle@agent1:~/#
fingerprint=.*********************************
tenancy=ocid1.tenancy..*********************************
region=eu-zurich-1 
key_file=/home/oracle/.oci/oem_ro.pem 

 
#Create private key you can copy or create by copy/past with vi
oracle@agent1:~/# vi /home/oracle/.oci/oem_ro.pem 
 -----BEGIN PRIVATE KEY----- 
*** 
*** 
*** 
*** 
*** 
-----END PRIVATE KEY----- 

# Test your connection and gather some info for example compartment list
oracle@agent1:~/#  oci iam compartment list
{ 
  "data": [ 
    { 
      "compartment-id": "ocid1.tenancy.oc1..*********************************", 
      "defined-tags": { 
        "Oracle-Tags": { 
          "CreatedBy": "*********************************@*********************************.com", 
          "CreatedOn": "2023-06-15T15:28:03.408Z" 
        } 
      }, 
      "description": "Exadata Cloud@Customer database service", 
      "freeform-tags": {}, 
      "id": "ocid1.compartment.o*********************************", 
      "inactive-status": null, 
      "is-accessible": null, 
      "lifecycle-state": "ACTIVE", 
      "name": "ExaCC*********************************", 
      "time-created": "2023-06-15T15:28:03.545000+00:00" 
    } 
  ] 
} 

Set https proxy for your OEM agent (which later will be used to communicate with OCI)

edit emd.properties and add on the end 2 extra parameters.

oci_http_proxy_host=

oci_http_proxy_port=

#Configure proxy on your agent installation folder: 

oracle@agent1:~/#  vi/u01/app/oracle/agent/agent_inst/sysman/config/emd.properties
oci_http_proxy_host=proxy.proxy.com 
oci_http_proxy_port=3038 

#Restart Agent
oracle@agent1:~/# emctl stop agent 
Oracle Enterprise Manager Cloud Control 13c Release 5 
Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved. 
Stopping agent ... stopped. 

oracle@agent1:~/#  [emagent1350] emctl start agent 
Oracle Enterprise Manager Cloud Control 13c Release 5 
Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved. 
Starting agent ........... started. 

Configure named credentials in OEM for OCI :

Go to Setup > Security > Named Credentials Click Create tab and create credentials using keys and OCI tenants keys copied from config or credentials:

next you can test it choice agent on which we installed oci and configure proxy.

Deploy Exadata plugins on Agents:

Go to Setup > Extensibility > Plug-ins

Choice:

Engineered Systems > Oracle Exadata

Click Deploy on and choice targets you wanna deploy it:

Follow logs to check if deployment successful :

Discovering ExaCC targets

Now we have all prerequisites configured and tested so we can discover our ExaCC :

Go to > Setup > Add Target > Add Target Manually > Add Using Guided Process

Choice target ExaCC infrastructure you wanna add to OEM , you can Also specify ExaCLI credentials to monitor Cellservers and ASMs (optional) We gather this credentials earlier in this tutorial.

Now you can Click next and Promote , and watch status of Target Promotions.

Please also turn on management packs for ExaCC

Go to Setup > Management Pack > Management Pack Access >

After Promotion finish you should have new entry in Target tab:

and Few minutes later you should also see your Oracle Cloud ExaCC infrastructure with all VMs and Databases.


You can go to each Exadata Cluster and see more details, also to ASM Grid Infrastructure:

Cell Statistics:

Please wait for some metrics and statistics some of them need up to 24h to be gathered.

One more interesting functionality of this integration is that there are new Dashboards

For Example Exadata Fleet Aggregated Capacity , Configuration , etc.

They can help you with overall look and capacity planning for future, you can see your total storage, memory current usage and historical values so you can predict growing trend in future.

I hope you enjoy this tutorial and already plan your ExaCC integration 😉