> 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: > > [nag...@serv_1]$ /usr/local/nagios/libexec/check_lsof.sh 256 > OK |value is 132 > > When I run it from the Nagios server (remotely): > [r...@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? > >
- Search for 'sudo' in nrpe.cfg , make sure the sudo prefix is set, not commented. - Look for 'tty' in the sudoers file, make sure 'requiretty' is commented. M. ------------------------------------------------------------------------------ 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 _______________________________________________ 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
