Dumb Question

Rusch, Daniel Daniel.Rusch at GlobalCrossing.com
Fri Aug 23 17:38:47 CEST 2002


>but...

>all args to the remote plugins must be encapsulated with quotes or they 
>are assumbed to be for the local plugin (specially check_by_ssh)

>but with NRPE, check_nrpe uses the command name to match a definition in 
>nrpe.cfg - so you cannot pass args to remote plugins with nrpe


Thanks, It dawned on me that check_npre didn't take extra args and that I
needed to add the args on the remote machine two seconds after I posted my
question.  I didn't retract the question because although my example had
errors in it, I still wanted to know how to see the actual command for other
commands.....

Once again thanks

Dan


-----Original Message-----
From: Subhendu Ghosh [mailto:sghosh at sghosh.org]
Sent: Friday, August 23, 2002 10:09 AM
To: Nagios-User (E-mail)
Subject: Re: [Nagios-users] Dumb Question


On Fri, 23 Aug 2002, Rusch, Daniel wrote:

> Is there a way to see exactly what command is that nagios is attempting to
> execute
> 
> For example, I have the following check_nrpe command defined and a service
> defined that uses the check_nrpe command:
> 
> # 'check_nrpe' command definition
> define command{
>         command_name    check_nrpe
>         command_line    /usr/local/nagios/libexec/check_nrpe $HOSTADDRESS$
> -p 5666 -c $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$
>         }
> 
> 
> # Service definition
> define service{
>         use                             generic-service         ; Name of
> service template to
>  use
> 
>         host_name                       hal9000
>         service_description             remote nrpe
>         is_volatile                     0
>         check_period                    24x7
>         max_check_attempts              3
>         normal_check_interval           1
>         retry_check_interval            1
>         contact_groups                  testbert
>         notification_interval           30
>         notification_period             24x7
>         notification_options            w,u,c,r
>         check_command                   check_nrpe!check_users!-w!10!-c!20
> 	}
> 
> I ASSUME that nagios is executing /usr/local/nagios/libexec/check_nrpe
> hal9000 -p 5666 -c check_users -w 10 -c 20
> 
> But is there a way to confirm that that is what it is actually executing??
> 
> 

strace/truss :) or run the daemon in debug mode.

In the above example...

ARG1 = check_users
ARG2 = -w
ARG3 = 10 
ARG4 = -c
ARG5 = 20


but...

all args to the remote plugins must be encapsulated with quotes or they 
are assumbed to be for the local plugin (specially check_by_ssh)

but with NRPE, check_nrpe uses the command name to match a definition in 
nrpe.cfg - so you cannot pass args to remote plugins with nrpe



-- 
-sg




-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390




More information about the Users mailing list