Adding an Entity to Oracle Management Cloud with JSON Method

Authors: Monowar Mukul (OCM), Nassyam Basha (Oracle ACE Director, OCM)

Nassyam Basha
Oracle Developers
6 min readFeb 27, 2019

--

Introduction

In the earlier articles, we have added entities using Oracle Management Cloud Graphical user interface, in this article we will add the database entity using the JSON method. Entity addition to OMC will be pushed from the target server using the command line utility OMCLI for Infrastructure monitoring with detailed instructions. Finally, we will also test how to delete the entity from the Oracle Management Cloud.

Prerequisites

Prerequisites are the same for adding entities either from OMC GUI or using the JSON push method. Please refer to the article “OMC: Discovering Entities for Oracle Infrastructure Monitoring — Part II” for more details on how to add entity using OMC GUI method. As part of prerequisites, we need to create the database user, or we can use the default database user “DBSNMP.” To create the new user, execute the predefined script “GrantPrivilegesMonSvc.sh” available to download from MOS Doc ID 2401597.1. This script will create user and grants the necessary roles and privileges.

After completion of the script, we can see the monitoring user has created, and then we can proceed to install the agent, the installation of an agent already shown with more details in the article “Oracle Management Cloud — Agent Deployment.”

Creating monitoring user and assigning roles.

To get the benefit of IT analytics modules, database user needs few additional roles by running the script “grantPrivilegesITA.sh.”

Adding the Database Entity using JSON

We have already created the user omcmon and created and granted to adequate roles and permissions following the documentation. Now we will add the database entity with the JSON method. To add the entity using command line we must use OMCLI (Oracle Management Command Line Interface). Using OMCLI we have to use two JSON files 1) Credentials 2) Entity information. We will see the practical steps below.

Note: We will add the entity from the target server

Initially, we have to prepare the credentials JSON used to authenticate and register the credentials with the Oracle Management Cloud. In credentials JSON file we have to enter the database user, password and the role of the user.

Credentials JSON file

Download JSON Files: https://codepen.io/nassyambasha/pen/rRVPQW.html

Next, we will prepare the JSON file for the Database entity; we have to mention the configuration of the entity such as

  • Entity Name
  • Entity Type
  • Display Name
  • Time zone region name
  • Hostname
  • Port
  • SID
  • Monitoring Password
Entity JSON file

Download JSON Files: https://codepen.io/nassyambasha/pen/rRVPQW.html

After preparing the JSON files, we will add the entity using the OMCLI with the below command.

After adding the entity, we can view the status of the entity by passing the entity JSON file.

In the above output, if the add entity failed then to troubleshoot, we can add verbose with the same command.

We can see the entity was added to the OMC successfully. Similarly, to delete the entity, we can use a similar command with the change of attribute “delete_entity.”

Summary

We’ve seen starting from prerequisites how to prepare the JSON files to add the entity to Oracle management cloud for infrastructure using command line utility OMCLI including troubleshooting. In this article key part is to understand the JSON file and to use the proper values carefully before adding an entity. We’ve also seen how to delete the entity using command line utility OMCLI.

Authors Bio

Nassyam Basha is a Database Administrator. He has around ten years of experience as a Production Oracle DBA, currently working as Database Expert with eProseed KSA. He holds a master’s degree in Computer Applications from the University of Madras. He is an Oracle 11g Certified master an Oracle ACE Director. He actively participates in Oracle-related forums such as OTN with a status of Super Hero, Oracle support awarded as “Guru” and acting as OTN Moderator and written numerous articles with OTN and on Toad World. He maintains an Oracle technology-related blog, www.oracle-ckpt.com and can be reached at https://www.linkedin.com/in/nassyambasha/

Monowar Mukul is currently working as a Principal Oracle Database Specialist. I am an Oracle certified Master (Oracle 12c Certified Master Administration, Oracle 12c Certified Master MAA, and Oracle 11g Certified Master Administration). He has been working as an Oracle DBA consultant over 17 years with Oracle MAA space for both Exadata and non-Exadata Systems, Oracle Cloud Space and SOA Middleware. He worked across various business sectors including tertiary education, energy, government, mining and transport in Australia. He demonstrated highly developed critical thinking and analytical skills working as a Principal Oracle Database Specialist. You can find more details about him and his work achievements at https://www.linkedin.com/in/monowarmukul/

References

Creating the Oracle Database monitoring credentials for Oracle Management Cloud (Infrastructure Monitoring) (Doc ID 2401597.1)

--

--