Benny! Thank you so much this solved my issue, I can now monitor custom plugins on a remote linux box!!!
Thanks again, Roderick On Fri, Sep 17, 2010 at 9:03 PM, C. Bensend <[email protected]> wrote: > >> **On the machine being monitored** >> I have the perl script I created in /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 as the nagios user and it works as >> expected) >> >> in the file: /usr/local/nagios/etc/nrpe.cfg i added >> command[check_wadmin]=/usr/bin/perl >> /usr/local/nagios/libexec/custom/check_wadmin.pl -f /tmp/nagiosInput.txt >> -i >> wait -n 35 > > OK, good. > >> ***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) >> >> #custom - 'check_wadmin' command definition >> define command{ >> command_name check_wadmin >> command_line check_nrpe >> } > > Bzzzt. Here's where it's incorrect. > > check_nrpe only checks the status of the NRPE daemon on the remote > end. You need to use NRPE on the remote end to invoke your > check_wadmin test. > > So, on your Nagios server, you need to set the command_line for the > check_wadmin command to something like: > > $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_wadmin > > > $USER1$ > ^^^^^^^ The path to your local plugins (on the Nagios server) > > check_nrpe > ^^^^^^^^^^ Need to use check_nrpe to check the command on the > remote host > > -H $HOSTADDRESS$ > ^^^^^^^^^^^^^^^^ What host to check > > -c check_wadmin > ^^^^^^^^^^^^^^^ What command to > run *ON THE > REMOTE HOST* > > NRPE only allows you to run plugins designed to be local-only on > a remote system. You need to tell it *what* to run, and *how* > to run it. > > Benny > > > -- > "Because you have arms like noodles, while I am vigorous and > burly." -- Hodgins, "Bones" > > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Nagios-users mailing list > [email protected] > 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 > ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Nagios-users mailing list [email protected] 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
