Passing ARGS to checkcommand

Mauro mauog at interfree.it
Fri Jan 16 08:30:09 CET 2004


I use chek_oracle plugin to test some oracle istances.
I use nrpe to do check on remote host because I haven't oracle on my nagios host.
So I defined one service and one check command for each oracle istance:

<service.cfg>

define service{
        ...
        check_command           check_oracle_login_istance1
        ...
        }


<checkcommands.cfg>

define command{
        command_name    check_oracle_login_istance1
        command_line    /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c check_oracle_login -a ISTANCE1
        }

So I must have an entry in service.cfg and in checkcommands.cfg for each istance.
It is possible to pass some arguments to check command to have only one entry in checkcommands.cfg and multiple entry in services.cfg (somthing like where $ARG1$ is equal then "ISTANCE1")?

<service.cfg>

define service{
        ...
        check_command           check_oracle_login  ISTANCE1
        ...
        }


<checkcommands.cfg>

define command{
        command_name    check_oracle_login
        command_line    /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c check_oracle_login -a $ARG1$
        }

                                                                      

Thank You


Mauro                                                                                                              
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040116/8846a0f4/attachment.html>


More information about the Users mailing list