Passing ARGS to checkcommand

Andreas Koch a.koch at eurodata.de
Fri Jan 16 09:02:01 CET 2004


Hello Mauro,

Am Fr, den 16.01.2004 schrieb Mauro um 08:30:
> 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
>         }
>  

That is Correct that you run the check on the Server.

> 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
>         ...
>         }

you must try this:

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                    

Andreas

>                                                                                           
-- 



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list