I have a main Nagios server that i monitor 12 other servers that run Oracle. To monitor the table spaces i use NRPE to run the check_oracle plugin and report back to the nagios server. I do this because when i set $ORACLE_SID on the nagios server im under the impression only one can be set, but i use different ORACLE_SIDS for each server.
Can more than one ORACLE_SID be defined on the nagios monitoring server so i can stop using NRPE to monitor the tables spaces on all of them? BTW i only have instant client installed on the Nagios server. Full oracle is on the db servers them selves.
Create config file for your custom command definitions in ***/etc/nagios-plugins/config/***, name it whatever you wish, for example, my_comm_defs.cfg and in there you should create command definition. As an example how to do that view other files in that directory and copy paste one command definition to your my_comm_defs.cfg, and, of course, change the command_line variable to check_oracle, and take care of the path to your check_oracle plugin. It should look something like this:
define command{
command_name check_my_oracle
command_line /usr/lib/nagios/plugins/check_oracle <OPTION> $ARG1$ $ARG2$ $ARGn$
}
Those $ARG#$ thingies are here just for example and those are the arguments which you would like to use.
Check the available options and arguments by starting the plugin check_oracle form terminal like this:
and see which one suits best for your needs. If you need only one then in command definition you will put only one $ARG1$
Then when creating a service which would check oracle, for check_command you should put the command_name of the command with arguments (in your case SID, I’ll take the argument is my_SID) delimited by !
Like this:
I haven’t personally tested it, but it seems that check_oracle is NRPE plugin. I’m not sure it could be configured without NRPE, but check that on other discussions about this issue. Google around the check_oracle