Alfredo Krieg's DBA blog - Oracle ACE

Sunday, May 13, 2018

Install OMC Data Collector To Harvest Oracle Enterprise Manager Target’s Metric Data


In order to make use of the data you already have in your Oracle Enterprise Manager (OEM) in Oracle’s Management Cloud (OMC) you need to install and configure the OMC’s Data Collector agent.

Here’s how you do it.

Login to OMC and navigate to Administration -> Agents -> Download

In the Agent Type box, select Data Collector.



Select the desired Operating System version. In my case is Linux 64 bit.






Once the agent is downloaded, take a note in the same OMC’s web page of the TENANT_ID and the UPLOAD_ROOT values.

Next login to the server hosting your OEM Repository database.
Create a directory in a place where you have enough space (3GB).



$ cd /u01/agent
$ mkdir omc
$ cd omc

Transfer the downloaded file to this new directory and unzip it.

$ ls
datacollector_linux.x64_1.23.0.zip
$ unzip datacollector_linux.x64_1.23.0.zip
Archive:  datacollector_linux.x64_1.23.0.zip
  inflating: unzip
  inflating: AgentDeployment.sh
  inflating: agentimage.properties
  inflating: agent.rsp
  inflating: agent_software_build.xml
 extracting: agentcoreimage.zip
  inflating: AgentInstall.sh


Modify the response file adding the required values. This step depends in whether you’re using a Gateway or a Proxy to connect to the OMC.

$ vi agent.rsp


All required values can be found here.



Now execute the installation.

$ ./AgentInstall.sh
Unzipping agent software, this may take some time...
Installing Data Collector...
Data Collector parameter validation started...
Skipping Data Collector pre-requisite checks as IGNORE_VALIDATIONS is set to true...
Data Collector base directory creation started...
Security artifacts download started...
Data Collector setup started...
Registering Data Collector...
Starting Data Collector...
Data Collector started.
Data Collector installation completed.
The following configuration scripts need to be executed as the root user:
/bin/sh /u01/agent/omc/datacollector/core/1.23.0/root.sh

You now need to execute the configuration script as root.
Once this is executed, go and verify the Data Collector agent is up and running.

$ cd /u01/agent/omc/datacollector/agent_inst/bin
./omcli status agent
Oracle Management Cloud Data Collector
Copyright (c) 1996, 2017 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Version                : 1.23.0
Started at             : 2017-04-07 11:45:04
Started by user        : oracle
Operating System       : Linux version 4.1.17-12.3.5.el6uek.x86_64 (amd64)
Data Collector enabled : true
Sender Status          : FUNCTIONAL
Gateway Upload Status  : FUNCTIONAL
Last successful upload : 2017-04-07 11:46:28
Last attempted upload  : 2017-04-07 11:46:27
Pending Files (MB)     : 2.26
Pending Files          : 80
Backoff Expiration     : (none)

---------------------------------------------------------------
Agent is Running and Ready


Verify the OMC’s Data Collector in the OMC console.

Navigate to Agents -> Administration -> Data Collectors

In this page you should see your newly installed Data Collector Agent.




Thanks,
Alfredo

Labels: ,

Wednesday, April 12, 2017

Oracle Management Cloud – Setup Entities in Log Analytics

In order to gather Weblogic’s Admin Server and Managed Server log files, you need first to install and configure the OMC Cloud Agent.  


Then you need to verify that the Cloud Agent is up and running.  Refer to my previous post on how to manage the Cloud Agent.


The next step is to setup the Log Analytics entities. In order to do this you have to make use of a JSON template. Oracle provides examples of these templates in the OMC documentation:


In this example we are going to add a Weblogic Admin Server and Managed server as Cloud Agent entities.

Unzip the example zip file and modify the omc_weblogic_domain_credless.json file.

The data added to this file really depends on your environment. This is how it looks for my environment:

{
   "entities":[
      {
         "name":"base_domain",
         "type":"omc_weblogic_domain",
         "displayName":"Weblogic_on_<servername>",
         "timezoneRegion":"PST",
         "properties":{
            "port":{
               "displayName":"Port",
               "value":"7001"
            },
            "domain_home":{
               "displayName":"Domain Home",
               "value":"/u01/app/oracle/product/ofm12.1.2/user_projects/domains/base_domain"
            },
            "admin_server_host":{
               "displayName":"AdminServer",
               "value":"<servername>.<domainname>"
            },
            "webLogic_home":{
               "displayName":"WebLogic Home",
               "value":"/u01/app/oracle/product/ofm12.1.2/wlserver"
            }
         },
         "associations":[
            {
               "assocType":"omc_contains",
               "sourceEntityName":"base_domain",
               "sourceEntityType":"omc_weblogic_domain",
               "destEntityName":" <servername>__AdminServer",
               "destEntityType":"omc_weblogic_j2eeserver"
            }
         ]
      },
      {
         "name":"<servername>_AdminServer",
         "type":"omc_weblogic_j2eeserver",
         "displayName":"AdminServer_<servername>",
         "timezoneRegion":"PST",
         "properties":{
            "host_name":{
               "displayName":"Weblogic Host",
               "value":"<servername>.<domainname>"
            },
            "domain_home":{
               "displayName":"Domain Home",
               "value":"/u01/app/oracle/product/ofm12.1.2/user_projects/domains/base_domain"
            },
            "listen_port":{
               "displayName":"Listen Port",
               "value":"7001"
            },
            "listen_port_enabled":{
               "displayName":"Listen Port Enabled",
               "value":"true"
            },
            "ssl_listen_port":{
               "displayName":"SSL Listen Port",
               "value":"7002"
            },
            "server_names":{
               "displayName":"Server Names",
               "value":"AdminServer"
            }
         },
         "associations":[
            {
               "assocType":"omc_monitored_by",
               "sourceEntityName":"<servername>_AdminServer",
               "sourceEntityType":"omc_weblogic_j2eeserver",
               "destEntityName":"base_domain",
               "destEntityType":"omc_weblogic_domain"
            }
         ]
      },
      {
         "name":"<servername>_ManagedServer_1",
         "type":"omc_weblogic_j2eeserver",
         "displayName":"ManagedServer_1_<servername>",
         "timezoneRegion":"PST",
         "properties":{
            "host_name":{
               "displayName":"Weblogic Host",
               "value":"<servername>.<domainname>"
            },
            "domain_home":{
               "displayName":"Domain Home",
               "value":"/u01/app/oracle/product/ofm12.1.2/user_projects/domains/base_domain"
            },
            "listen_port":{
               "displayName":"Listen Port",
               "value":"7003"
            },
            "listen_port_enabled":{
               "displayName":"Listen Port Enabled",
               "value":"true"
            },
            "ssl_listen_port":{
               "displayName":"SSL Listen Port",
               "value":"7005"
            },
            "server_names":{
               "displayName":"Server Names",
               "value":"ManagedServer_1"
            }
         },
         "associations":[
            {
               "assocType":"omc_monitored_by",
               "sourceEntityName":"<servername>_ManagedServer_1",
               "sourceEntityType":"omc_weblogic_j2eeserver",
               "destEntityName":"base_domain",
               "destEntityType":"omc_weblogic_domain"
            }
         ]
      }
   ]
}

Save this file and load the entities to the Cloud Agent as follows:

$ ./omcli add_entity agent /home/oracle/omc_weblogic.json
Oracle Management Cloud Agent 
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
Operation Succeeded: Accepted 3 of 3 entities for processing.

As you can see, 3 entities were loaded to the agent; the base_domain, Admin Server and Managed Server.


Now verify the new entities in the Log Analytics configuration page.
-        Click on the “Navigation” icon.
-        Under “Cloud Services” click on “Log Analytics”



Click on “Configuration” located in the right side of the screen






In the “Entities” section. Click on the icon with the number (ie. 4)





You will see a list of the new entities just added.
Go back to “Log Explorer” by clicking on







In the search box type ‘Log Source’ = ‘FMW WLS Server Logs’






Click on “Run”





Check all the log information displayed for the WLS Server



Read more »

Labels: ,