Problem with custom plugin on a remote linux box

Roderick Andrew Clemente rod at mwave.co.jp
Thu Sep 2 09:19:41 CEST 2010


Hi All,

Thanks for taking the time to read this. I am currently trying to setup
Nagios to monitor a Feed Handler on a remote Linux box. I am so close I can
taste it! Sadly, the nagios admin doesn't appear to be reading the command
properly. I am new to Nagios so please bear with me, there are a lot of
moving pieces so I thought i would provide as much information as possible
to make it easy to figure out the issue. If there is something I am missing,
please don't hesitate to ask. 

To start with, the admin is successfully monitoring other services on the
box, ping, processes, disk usage, etc. but for the custom plugin I am trying
to read, it fails with a status of CRITICAL and status info of NULL. Here is
what I believe to be the relevant config info.

On the machine being monitored
I added the perl script I created to /usr/local/nagios/libexec/custom/ (its
a modification of
http://www.deimos.fr/gitweb/?p=nagios_plugins.git;a=blob;f=check_file_conten
t/check_file_content.pl;h=ecf737389fd5a4360ee864eb55aca92056308445;hb=HEAD I
have tested it from the command line and it works as expected)

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

On the monitoring machine
I already had the machine monitoring the remote linux box's basic stats, I
did this by creating a remotelinuxhost.cfg file at
/usr/local/nagios/etc/objects (and adding a reference in the main config)

To remotelinuxhost.cfg I added: 

define service{
use generic-service ; Name of service template to use
host_name Sun89
service_description Check Feed Handler
check_command check_wadmin
}


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
}

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!!!

 

〜・〜・〜・〜・〜・〜・〜・〜・〜・〜・〜・〜・〜・〜・

Roderick Andrew Clemente

Multi Wave Co., Ltd. 

9F Kanda Tsukasa-cho Bldg., 2-2-12 Kanda Tsukasa-cho 

Chiyoda-ku, Tokyo 101 0048 Japan 

Tel: +81-3 3258 7080

Fax: +81-3 3258 7085

Email:  <mailto:rod at mwave.co.jp> rod at mwave.co.jp 

〜・〜・〜・〜・〜・〜・〜・〜・〜・〜・〜・〜・〜・〜・

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100902/09da786c/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
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