Problem with custom plugin on a remote linux box

C. Bensend benny at bennyvision.com
Thu Sep 2 12:13:28 CEST 2010


> in the file: vi /usr/local/nagios/etc/nrpe.cfg i added
> command[check_wadmin]=perl
> /usr/local/nagios/libexec/custom/check_wadmin.pl
> -f /tmp/nagiosInput.txt -i wait -n 35

Always use the full path to interpreters, as the Nagios environment
is not the same as a normal shell user's.

> I also added commands.cfg (in the same folder)
>
> define command{
> command_name check_wadmin
> command_line perl /usr/local/nagios/libexec/custom/check_wadmin.pl -f
> /tmp/nagiosInput.txt -i wait -n 35
> }

Same with here.

> When I reloaded the service, it accepted the config but the result is as
> listed above... if anyone has any suggestions it would be greatly
> appreciated!!!

The command you have created above expects the check command to be
on the local (Nagios) server, *not* the remote client.  I don't
think that's what you intend.  Since your custom plugin is on the
remote server and is configured within NRPE to be run, you need
to use check_nrpe on the Nagios server to test it.

Modify the check_wadmin command on the Nagios server to use the
check_nrpe command to test it on the remote server, and I think
you'll probably be OK.

Benny


-- 
"Because you have arms like noodles, while I am vigorous and
burly."                               -- Hodgins, "Bones"



------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
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