L Add Entity by Creating a JSON File

Say, you want to monitor and analyze the log files of an application that comprises an Oracle Database and an Oracle WebLogic Administration Server. Then you must add the entities pertaining to the application setup to be able to monitor them.

  1. Download the sample JSONs pertaining to Oracle Database and Oracle WebLogic Server to use as templates. See Download and Customize Oracle Log Analytics JSONs.

  2. Edit the sample entity definition files with relevant values for your entities.

    In the definition files, you must replace the text within the < > brackets (along with the angular brackets themselves) with the correct values.

    For example, in the following replace <db name> with the name of the database instance, such as macdb1 and <time zone> with the time zone value of the host, such as PST.

    {
            "entities": [
    
                    {
                            "name": "<db name>",
                            "type": "omc_oracle_db_instance",
                            "displayName": "<db name>",
                            "timezoneRegion": "<time zone>",
    									 ......
                 }
  3. Save the JSON file.

  4. Run the following omcli command to add the entities from the <AGENT_BASE_DIR>/agent_inst/bin location:

    <AGENT_BASE_DIR>/agent_inst/bin/omcli add_entity agent FILENAME 

    Where FILENAME is the name of the file that contains the entity definition to be added.

Note:

  • If your entities were already discovered in Oracle Infrastructure Monitoring, those entities will also be available for log collection, if:

    • The target properties for the entity have been defined correctly during discovery so that the log file locations can be resolved.

    • Correct associations (such as omc_uses) between the entity and the local host, and the cloud agent and the local host are present.

      If the required properties are missing, to enable log collection, you must update the JSON (used at the time of adding these entities in Oracle Infrastructure Monitoring) with the required properties and run the omcli update_entity command. See omcli Command Options in Working with Oracle Management Cloud.

  • If you want to add an entity for use with both Oracle Log Analytics and Oracle Infrastructure Monitoring, you should add the entity using credentials. See Add Entities Using JSON Files in Using Oracle Infrastructure Monitoring.

  • To enable Infrastructure Monitoring for the omc_oracle_db entity that is already being used by Oracle Log Analytics, see Monitoring with Oracle Infrastructure Monitoring and Oracle Log Analytics in Using Oracle Infrastructure Monitoring.

  • For the omc_oracle_db entity, if the format is specified as “displayName: DB_Name”, it must be changed to “displayName: DB_Name/sid_name”. This naming convention will help reduce issues with entity reconciliation if this entity is used later by Oracle Infrastructure Monitoring.