Oracle DBAsIn an ever changing world where Oracle DBAs are asked to do more every day there may come a time where you are asked to monitor a database that Cloud Control does not monitor or have no plugin available.
Out of the box there is currently no monitoring for MAXDB in Cloud Control 12c nor does there exist a plugin. Not sure if we will ever see this plugin as we all know the history with Oracle and SAP.
As we put our head together to try to find the right solution to monitor MAXDB we wanted to use are existing monitor tools so we can continue to monitor all of our databases from a central location. We also want to be able to use existing programs that we already know to setup any scripting for this monitoring Ex bash, python.
What we were asked to monitor:
CPU and Memory usage
First 3 metrics are supported out of the box by the OEM agent. The last which is the MAXDB status is what we setup to use a metric extension for this metric.
SolutionThe solution we came up with was using CYGWIN, Cloud Control and Metric Extensions. In this blogger I will discuss how you can implement the same solution on you side.
Per-StepsThe following will not be discussed in the blogged
OEM Agent installed and configured on MAXDB server
Cygwin installed and configured
MAXDB Database configured and running
Steps1. Create a script like the one below to monitor the state of the MAXDB database
DB_STATE=`/cygdrive/c/DatabaseStudio/pgm/dbmcli -d C1D -u control,<pw> db_state |grep LINE`;
if [ $DB_STATE = OFFLINE ] ; then
2. Save this on the MAXDB server as something like check_maxdb_state.sh
3. Now let create a metric extension that will call this script
4. Login to OEM and go to Enterprise>Monitoring>Metric Extension
5. Give it a name, set adapter and enable collection as needed
Note: the adapter type is OS Command
6. Set the command to call the script that was created then set the starts with em_result= then click next
7. Set metric columns as noted in the screenshot click next
8. Set credentials as needed
9. Run a test as needed
10. Review the summary and click finished
Make sure to add this metric to you incident rules to you can be alerted when MAXDB goes OFFLINE
Follow me on Twitter