Dumb Question
Subhendu Ghosh
sghosh at sghosh.org
Fri Aug 23 17:08:54 CEST 2002
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
More information about the Users
mailing list