Re: [Nagios-users] Custom perl plugin doesn't work
The first step should be to explain why, on the monitoring machine, it does not detect blah as a command, even when it's only an argument to check_nrpe_1arg. I should be able to call this command on a remote machine through check_nrpe without defining it on the host machine, correct? The host simply looks at the output line... On 12/13/2011 01:55 PM, Zach La Celle wrote: I'm not sure exactly what you mean. On the monitor machine, there's only the blah.cfg file in '/etc/nagios-plugins/config/blah.cfg'. I didn't even think that this was necessary, since it's really just running check_nrpe_1arg (which is defined in /etc/nagios-plugins/config/check_nrpe.cfg) and passing in the name of the command to the remote host. On the remote host, it has the blah command defined in /etc/nagios/nrpe.cfg, as such: command[blah]=/usr/lib/nagios/plugins/blah.pl So, it should call check_nrpe on the monitoring host, which uses the nrpe-server to attempt to run the command through the remote host. Since the command is listed in nrpe.cfg on the remote host, it should see it there, run the actual perl script listed there, and return the output. On 12/13/2011 12:53 PM, m...@catsnest.co.uk wrote: On Tue, Dec 13, 2011 at 4:46 PM, Zach La Celle lace...@roboticresearch.com mailto:lace...@roboticresearch.com wrote: The error, when I attempt to run it from the monitoring machine, is: NRPE: Command 'blah' not defined The command IS defined in /etc/nagios/nrpe.cfg on the target machine. The command is ALSO defined in /etc/nagios-plugins/config/blah.cfg on the target machine. Is '/etc/nagios-plugins/config/blah.cfg' linked in your Nrpe commands config? Can you run the command via check_nrpe on the local (target) machine? Only time I saw a command not getting picked up by nrpe was when I had started nrpe twice! and as such was only restarting the second one which had not bound to the interface of course. Ritchie -- -- http://23.me.uk/2 -- --Time flies like an arrow; fruit flies like a banana. -- I restarted nagios-nrpe-server after adding the command. I'm calling it from my monitoring server with /usr/lib/nagios/plugins/check_nrpe -H hostaddress -c blah When I run the perl script myself, it works fine. Any ideas? All of my other checks for this host work. -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net mailto:Nagios-users@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 -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/ ___ Nagios-users mailing list Nagios-users@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 -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/ ___ Nagios-users mailing list Nagios-users@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 -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure ___ Nagios-users mailing list Nagios-users
[Nagios-users] Custom perl plugin doesn't work
The error, when I attempt to run it from the monitoring machine, is: NRPE: Command 'blah' not defined The command IS defined in /etc/nagios/nrpe.cfg on the target machine. The command is ALSO defined in /etc/nagios-plugins/config/blah.cfg on the target machine. I restarted nagios-nrpe-server after adding the command. I'm calling it from my monitoring server with /usr/lib/nagios/plugins/check_nrpe -H hostaddress -c blah When I run the perl script myself, it works fine. Any ideas? All of my other checks for this host work. -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] Custom perl plugin doesn't work
I'm not sure exactly what you mean. On the monitor machine, there's only the blah.cfg file in '/etc/nagios-plugins/config/blah.cfg'. I didn't even think that this was necessary, since it's really just running check_nrpe_1arg (which is defined in /etc/nagios-plugins/config/check_nrpe.cfg) and passing in the name of the command to the remote host. On the remote host, it has the blah command defined in /etc/nagios/nrpe.cfg, as such: command[blah]=/usr/lib/nagios/plugins/blah.pl So, it should call check_nrpe on the monitoring host, which uses the nrpe-server to attempt to run the command through the remote host. Since the command is listed in nrpe.cfg on the remote host, it should see it there, run the actual perl script listed there, and return the output. On 12/13/2011 12:53 PM, m...@catsnest.co.uk wrote: On Tue, Dec 13, 2011 at 4:46 PM, Zach La Celle lace...@roboticresearch.com mailto:lace...@roboticresearch.com wrote: The error, when I attempt to run it from the monitoring machine, is: NRPE: Command 'blah' not defined The command IS defined in /etc/nagios/nrpe.cfg on the target machine. The command is ALSO defined in /etc/nagios-plugins/config/blah.cfg on the target machine. Is '/etc/nagios-plugins/config/blah.cfg' linked in your Nrpe commands config? Can you run the command via check_nrpe on the local (target) machine? Only time I saw a command not getting picked up by nrpe was when I had started nrpe twice! and as such was only restarting the second one which had not bound to the interface of course. Ritchie -- -- http://23.me.uk/2 -- --Time flies like an arrow; fruit flies like a banana. -- I restarted nagios-nrpe-server after adding the command. I'm calling it from my monitoring server with /usr/lib/nagios/plugins/check_nrpe -H hostaddress -c blah When I run the perl script myself, it works fine. Any ideas? All of my other checks for this host work. -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/ ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net mailto:Nagios-users@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 -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/ ___ Nagios-users mailing list Nagios-users@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 -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/___ Nagios-users mailing list Nagios-users@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