Problem with custom plugin on a remote linux box
Posted: Thu Sep 02, 2010 2:14 am
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_p ... 45;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!!!
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_p ... 45;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!!!