In my previous blog, we looked at monitoring a premises linux server (Agent Install). In this blog we will add the monitoring of the database to the agent. For this we need 2 files :
File 1 (A Credential file for the Oracle database, you will need to update the password to what you have set in your environment): omc_oracle_db_creds.json
{
“credentials” : [
{
“id” : “SQLCreds“,
“name” : “SQLCreds“,
“credType” : “DBCreds“,
“properties” : [
{
“name” : “DBUserName“,
“value” : “CLEAR[dbsnm]p”
},
{
“name” : “DBPassword“,
“value” : “CLEAR[w1ll0w]”
},
{
“name” : “DBRole“,
“value” : “CLEAR[Normal]”
}
]
}
]
}
File 2 (The Agent Configuration file, you will need to update the fields highlighted in yellow to your environment) : oracle_agent_add.json
{
“entities”: [{
“name”: “C_stest1“,
“type”:
“omc_oracle_db“,
“displayName“: “stest1“,
“timezoneRegion“: “BST”,
“credentialRefs“: [“SQLCreds“],
“properties”: {
“host_name“: {
“displayName“: “host_name“,
“value”: “e33392“
},
“port”: {
“displayName“: “port”,
“value”: “1521”
},
“sid“: {
“displayName“: “sid“,
“value”: “stest1“
},
“capability”: {
“displayName“: “capability”,
“value”: “monitoring”
}
}
}]
}
Lets get started to monitor the database.
[x33245 agentsw]$/c1/oms/agent/agent_inst/bin/omcli add_entity agent oracle_agent_add.json -credential_file omc_oracle_db_creds.json Oracle Management Cloud Agent Copyright (c) 1996, 2016 Oracle Corporation. Allrights reserved. Operation Succeeded: Accepted 1 of 1 entities for processing.
Lets check the status of the upload
[x33245 agentsw]$/c1/oms/agent/agent_inst/bin/omcli status_entity agent oracle_agent_add.json Oracle Management Cloud Agent Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved. omc_oracle_db.C_stest1 : AGENT:entity fully monitored [x33245 agentsw]$
That’s all, Now if we log onto the OMC and drill into the Infastructure Monitoring – we can see the server and see our database being monitored.
We can drill into the database to see Top SQL and Top Wait Events
Also the TableSpace Usage!