NRPE
Ihab Samara
ihab24 at hotmail.com
Tue Dec 7 17:09:45 CET 2010
Hi List
I have a problem using check_nrpe:
The script on the remote machine is running this command:
#/bin/bash
output=`sudo /usr/sbin/lsof -X |grep tomcat| wc -l`
max=$1
if [ "$output" -lt "$max" ]; then
echo "OK |value is "$output""
exit 0;
else
echo "CRITICAL value is "$output""
exit 2;
fi
I have this line in sudoers file:
nagios ALL=(ALL) NOPASSWD: /usr/sbin/lsof
I have this in the nrpe.cfg:
command[check_lsof]=/usr/local/nagios/libexec/check_lsof.sh 256
When I run the command from the nagios user on the remote machine:
[nagios at serv_1]$ /usr/local/nagios/libexec/check_lsof.sh 256
OK |value is 132
When I run it from the Nagios server (remotely):
[root at healthy libexec]# ./check_nrpe -H 10.1.1.1 -c check_lsof
OK |value is 0
Ive set the user in /etc/xinetd.d/nrpe to "nagios", and all the other checks are working fine.
Any thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20101207/ff479a6c/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
-------------- 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