LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Nagios Oracle question (https://www.linuxquestions.org/questions/linux-general-1/nagios-oracle-question-659046/)

investmentbnker75 07-29-2008 11:37 AM

Nagios Oracle question
 
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.

Thanks!

MensaWater 07-30-2008 09:51 AM

What we do here is we have Oracle client installed on the Nagios master. We setup tnsnames.ora as we would on any Oracle host on this Nagios master.

In services.cfg we enter things like:

To check our DB SID named "PROD":
Code:

define service{
        use                    generic-service
        host_name              ERPDB
        service_description    PROD: SID
        contact_groups          ux-admins, some-dbas, noc-op
        check_period            erpdb_prod
        check_command          check_oracle!--sid!PROD
        }

To check our DB SID named "REPORT":
Code:

define service{
        use                    generic-service
        host_name              RBACK
        service_description    REPORT: SID
        contact_groups          ux-admins, some-dbas, noc-op
        check_period            rback_report
        check_command          check_oracle!--sid!REPORT
        }

The check_oracle is defined in the checkcommands.cfg as:
Code:

# 'check_oracle' command definition
define command{
command_name    check_oracle
command_line    $USER1$/check_oracle.pl $ARG1$ $ARG2$
}

The check_oracle.pl in the libexec directory takes the arguments passed in and sets values based on what the services.cfg had specified. This means SID is a variable throughout. The specific command above by the way simply does a tnsping of the SID.

We do similar for NRPE access to the boxes where the databases live to check whether the listener and the pmon process are running. These are also use input from nrpe.cfg for variables on systems where we have multiple databases running.


All times are GMT -5. The time now is 05:58 PM.