Re: [Nagios-users] NRPE: Unable to read output; but works when run under strace ...
I would try to run a basic script which logs the nrpe environment into a file. it will make sure what is available to you and what not. test if: there are environment vars.. there is a STDOUT\IN\ERR available etc.. #!/usr/bin/env ruby f = File.open(/tmp/nrpetest.log,a) f.sync = true f.puts ENVIROMENTAR VARS\n=== ENV.each {|k,p| f.puts #{k} = #{p}} f.puts STD DATA\n== f.puts stdout exists?: #{$stdout} if $stdout f.puts stdout is tty?: #{$stdout.isatty} begin $stdout.write_nonblock 0 f.puts Wrote 0 to stdout rescue = e f.puts didnt wrote to stdout f.puts e.message f.puts e.backtrace.inspect end end modify the above to make sure what is the cause of this problem. you can also try to access stdout\err Regards, Eliezer On 1/8/2013 3:53 PM, Florian Ernst wrote: Hello all, following up to myself ... On Mon, Oct 08, 2012 at 08:31:21PM +0200, Florian Ernst wrote: [...] However, it got weirder: if I strace the nrpe process, everything works as desired: [...] I found no further hints in the strace log, but this led me to assume that there is some NRPE weirdness involved, and thus I'm writing here instead of further digging through the system. Any ideas? Lacking any further clue as to what peculiarity might be responsible for this weird behavior, I decided to simply let the nrpe process permanently run under strace like strace -f -q -e none -o /dev/null ... The performance impact is minimal, and I finally get check results. Not really a solution, but it'll do. Cheers, Flo -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 ___ 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] NRPE: Unable to read output; but works when run under strace ...
Hello Eliezer, thanks for your reply. On Mon, Jan 14, 2013 at 05:41:28PM +0200, Eliezer Croitoru wrote: I would try to run a basic script which logs the nrpe environment into a file. it will make sure what is available to you and what not. test if: [...] modify the above to make sure what is the cause of this problem. you can also try to access stdout\err As mentioned in the original post¹ indeed the desired text output is generated [by the plugin] but somehow gets discarded [by NRPE]. However, if I strace the nrpe process, everything works as desired. The latter is what irks me. The plugins themselves are running fine. Cheers, Flo ¹ http://sourceforge.net/mailarchive/message.php?msg_id=29939293 -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 ___ 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] NRPE: Unable to read output; but works when run under strace ...
Hello all, following up to myself ... On Mon, Oct 08, 2012 at 08:31:21PM +0200, Florian Ernst wrote: [...] However, it got weirder: if I strace the nrpe process, everything works as desired: [...] I found no further hints in the strace log, but this led me to assume that there is some NRPE weirdness involved, and thus I'm writing here instead of further digging through the system. Any ideas? Lacking any further clue as to what peculiarity might be responsible for this weird behavior, I decided to simply let the nrpe process permanently run under strace like strace -f -q -e none -o /dev/null ... The performance impact is minimal, and I finally get check results. Not really a solution, but it'll do. Cheers, Flo -- Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS and more. Get SQL Server skills now (including 2012) with LearnDevNow - 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only - learn more at: http://p.sf.net/sfu/learnmore_122512 ___ 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] NRPE: Unable to read output; but works when run under strace ...
Hello John / Tech Support, thanks for your reply, and sorry for the delay in answering. On Wed, Oct 10, 2012 at 03:10:13PM -0400, Tech Support wrote: Whenever I've had a problem with a plugin, and was trying to figure out what was going on, I've had 100% success using a little PERL script called capture-plugin.pl that I found. You can find it here: http://www.waggy.at/nagios/capture_plugin.htm. You should check it out. It's genius is in its simplicity. Well, it helps debugging plugin weirdness, but my problem lies with NRPE: a check doesn't work when TTBOMK it should work, and it actually works as desired when I strace the NRPE process. At the moment I see no plugin to debug, but thanks anyway. Cheers, Flo -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ 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] NRPE: Unable to read output; but works when run under strace ...
Whenever I've had a problem with a plugin, and was trying to figure out what was going on, I've had 100% success using a little PERL script called capture-plugin.pl that I found. You can find it here: http://www.waggy.at/nagios/capture_plugin.htm. You should check it out. It's genius is in its simplicity. Regards; John -Original Message- From: Florian Ernst [mailto:florian_er...@gmx.net] Sent: Tuesday, October 09, 2012 2:14 PM To: Nagios Users List Subject: Re: [Nagios-users] NRPE: Unable to read output; but works when run under strace ... Hello Peter, thanks for your reply. However, as previously written, I know of the peculiarities that might arise once sudo joins the team, and in the issue at hand sudo is no more involved than being used for illustration purposes while the issue itself doesn't even remotely touch sudo at all. Furthermore, I never found any the necessity to deal with !requiretty on Debian, but indeed had to make use of this sudo option on RHEL. Still, no sudo involved in this case, sorry ... Cheers, Flo -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ 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 -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ 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] NRPE: Unable to read output; but works when run under strace ...
Hello Peter, thanks for your reply. However, as previously written, I know of the peculiarities that might arise once sudo joins the team, and in the issue at hand sudo is no more involved than being used for illustration purposes while the issue itself doesn't even remotely touch sudo at all. Furthermore, I never found any the necessity to deal with !requiretty on Debian, but indeed had to make use of this sudo option on RHEL. Still, no sudo involved in this case, sorry ... Cheers, Flo -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ 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] NRPE: Unable to read output; but works when run under strace ...
-Oorspronkelijk bericht- Van: Florian Ernst [mailto:florian_er...@gmx.net] Verzonden: dinsdag 9 oktober 2012 20:14 Aan: Nagios Users List Onderwerp: Re: [Nagios-users] NRPE: Unable to read output; but works when run under strace ... Hello Peter, thanks for your reply. However, as previously written, I know of the peculiarities that might arise once sudo joins the team, and in the issue at hand sudo is no more involved than being used for illustration purposes while the issue itself doesn't even remotely touch sudo at all. Furthermore, I never found any the necessity to deal with !requiretty on Debian, but indeed had to make use of this sudo option on RHEL. Still, no sudo involved in this case, sorry ... Cheers, Flo [Peter Kaagman] Sorry that did not help you. Guess I should have read you post more closely... Peter -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ 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
[Nagios-users] NRPE: Unable to read output; but works when run under strace ...
Hello all, given a fairly well-running monitoring setup with about 18k services I thought I had understood the basics. However, the following leaves me clueless, and I hope I'm merely missing something obvious here: On an up-to-date Debian Squeeze (i386) OpenVZ guest I have established that my monitoring user can execute a given command: root@vserv08:/# sudo -u monitor -i /usr/lib/nagios/plugins/check_dummy 0 success; echo Exitcode: $? OK: success Exitcode: 0 So far, so good. Now entering NRPE, using a stripped-down config for illustrating the point: root@vserv08:/# grep -v -e '^$' -e '^#' /etc/nagios/nrpe.cfg debug=1 nrpe_user=monitor nrpe_group=monitor allowed_hosts=127.0.0.1 command[dummy]=/usr/lib/nagios/plugins/check_dummy 0 success root@vserv08:/# ps auxww | grep '[/]usr/sbin/nrpe' monitor 7215 0.0 0.1 3704 892 ?Ss 15:20 0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d The process startup logged as follows: Oct 8 15:20:22 vserv08 nrpe[7214]: Added command[dummy]=/usr/lib/nagios/plugins/check_dummy 0 success Oct 8 15:20:22 vserv08 nrpe[7214]: INFO: SSL/TLS initialized. All network traffic will be encrypted. Oct 8 15:20:22 vserv08 nrpe[7215]: Starting up daemon Oct 8 15:20:22 vserv08 nrpe[7215]: Listening for connections on port 5666 Oct 8 15:20:22 vserv08 nrpe[7215]: Allowing connections from: 127.0.0.1 However, executing the dummy command won't work: root@vserv08:/# /usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -c dummy NRPE: Unable to read output This has been logged as: Oct 8 15:21:36 vserv08 nrpe[7234]: Connection from 127.0.0.1 port 48791 Oct 8 15:21:36 vserv08 nrpe[7234]: Host address is in allowed_hosts Oct 8 15:21:36 vserv08 nrpe[7234]: Handling the connection... Oct 8 15:21:36 vserv08 nrpe[7234]: Host is asking for command 'dummy' to be run... Oct 8 15:21:36 vserv08 nrpe[7234]: Running command: /usr/lib/nagios/plugins/check_dummy 0 success Oct 8 15:21:36 vserv08 nrpe[7234]: Command completed with return code 2 and output: Oct 8 15:21:36 vserv08 nrpe[7234]: Return Code: 2, Output: NRPE: Unable to read output Oct 8 15:21:36 vserv08 nrpe[7234]: Connection from 127.0.0.1 closed. This strikes me as weird: nrpe tries to execute the defined command, but somehow no output shows up. I know of the peculiarities that might arise once sudo joins the team or when permissions aren't set appropriately, but this doesn't apply here. Playing around with the dummy command (substituting a shell script, sprinkling '| tee -a logfile' into the code, ...) revealed that indeed the desired text output is generated but somehow gets discarded. Perhaps the monitoring user or even the whole system is subtly broken, but given that there are ~400 similiarily setup systems (all using the same workflow/automatisms for deploying the monitoring infrastructure) I was starting to wonder how that might have happened ... However, it got weirder: if I strace the nrpe process, everything works as desired: root@vserv08:/# strace -f -o /root/log -p 7215 And then in another terminal: root@vserv08:/# /usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -c dummy OK: success Logged as follows: Oct 8 15:21:57 vserv08 nrpe[7240]: Connection from 127.0.0.1 port 37275 Oct 8 15:21:57 vserv08 nrpe[7240]: Host address is in allowed_hosts Oct 8 15:21:57 vserv08 nrpe[7240]: Handling the connection... Oct 8 15:21:57 vserv08 nrpe[7240]: Host is asking for command 'dummy' to be run... Oct 8 15:21:57 vserv08 nrpe[7240]: Running command: /usr/lib/nagios/plugins/check_dummy 0 success Oct 8 15:21:57 vserv08 nrpe[7240]: Command completed with return code 0 and output: OK: success Oct 8 15:21:57 vserv08 nrpe[7240]: Return Code: 0, Output: OK: success Oct 8 15:21:57 vserv08 nrpe[7240]: Connection from 127.0.0.1 closed. I found no further hints in the strace log, but this led me to assume that there is some NRPE weirdness involved, and thus I'm writing here instead of further digging through the system. Any ideas? Cheers, Flo -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ 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] NRPE: Unable to read output; but works when run under strace ...
Lol... had me going for a while to... for me the awnser was in the sudo config (visudo)... it required a user on a tty... I believe the directive was requiretty. Disable that line and you'll be fine I think. Peter Van: Florian Ernst [florian_er...@gmx.net] Verzonden: maandag 8 oktober 2012 20:31 To: nagios-users@lists.sourceforge.net Onderwerp: [Nagios-users] NRPE: Unable to read output; but works when run under strace ... Hello all, given a fairly well-running monitoring setup with about 18k services I thought I had understood the basics. However, the following leaves me clueless, and I hope I'm merely missing something obvious here: On an up-to-date Debian Squeeze (i386) OpenVZ guest I have established that my monitoring user can execute a given command: root@vserv08:/# sudo -u monitor -i /usr/lib/nagios/plugins/check_dummy 0 success; echo Exitcode: $? OK: success Exitcode: 0 So far, so good. Now entering NRPE, using a stripped-down config for illustrating the point: root@vserv08:/# grep -v -e '^$' -e '^#' /etc/nagios/nrpe.cfg debug=1 nrpe_user=monitor nrpe_group=monitor allowed_hosts=127.0.0.1 command[dummy]=/usr/lib/nagios/plugins/check_dummy 0 success root@vserv08:/# ps auxww | grep '[/]usr/sbin/nrpe' monitor 7215 0.0 0.1 3704 892 ?Ss 15:20 0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d The process startup logged as follows: Oct 8 15:20:22 vserv08 nrpe[7214]: Added command[dummy]=/usr/lib/nagios/plugins/check_dummy 0 success Oct 8 15:20:22 vserv08 nrpe[7214]: INFO: SSL/TLS initialized. All network traffic will be encrypted. Oct 8 15:20:22 vserv08 nrpe[7215]: Starting up daemon Oct 8 15:20:22 vserv08 nrpe[7215]: Listening for connections on port 5666 Oct 8 15:20:22 vserv08 nrpe[7215]: Allowing connections from: 127.0.0.1 However, executing the dummy command won't work: root@vserv08:/# /usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -c dummy NRPE: Unable to read output This has been logged as: Oct 8 15:21:36 vserv08 nrpe[7234]: Connection from 127.0.0.1 port 48791 Oct 8 15:21:36 vserv08 nrpe[7234]: Host address is in allowed_hosts Oct 8 15:21:36 vserv08 nrpe[7234]: Handling the connection... Oct 8 15:21:36 vserv08 nrpe[7234]: Host is asking for command 'dummy' to be run... Oct 8 15:21:36 vserv08 nrpe[7234]: Running command: /usr/lib/nagios/plugins/check_dummy 0 success Oct 8 15:21:36 vserv08 nrpe[7234]: Command completed with return code 2 and output: Oct 8 15:21:36 vserv08 nrpe[7234]: Return Code: 2, Output: NRPE: Unable to read output Oct 8 15:21:36 vserv08 nrpe[7234]: Connection from 127.0.0.1 closed. This strikes me as weird: nrpe tries to execute the defined command, but somehow no output shows up. I know of the peculiarities that might arise once sudo joins the team or when permissions aren't set appropriately, but this doesn't apply here. Playing around with the dummy command (substituting a shell script, sprinkling '| tee -a logfile' into the code, ...) revealed that indeed the desired text output is generated but somehow gets discarded. Perhaps the monitoring user or even the whole system is subtly broken, but given that there are ~400 similiarily setup systems (all using the same workflow/automatisms for deploying the monitoring infrastructure) I was starting to wonder how that might have happened ... However, it got weirder: if I strace the nrpe process, everything works as desired: root@vserv08:/# strace -f -o /root/log -p 7215 And then in another terminal: root@vserv08:/# /usr/lib/nagios/plugins/check_nrpe -H 127.0.0.1 -c dummy OK: success Logged as follows: Oct 8 15:21:57 vserv08 nrpe[7240]: Connection from 127.0.0.1 port 37275 Oct 8 15:21:57 vserv08 nrpe[7240]: Host address is in allowed_hosts Oct 8 15:21:57 vserv08 nrpe[7240]: Handling the connection... Oct 8 15:21:57 vserv08 nrpe[7240]: Host is asking for command 'dummy' to be run... Oct 8 15:21:57 vserv08 nrpe[7240]: Running command: /usr/lib/nagios/plugins/check_dummy 0 success Oct 8 15:21:57 vserv08 nrpe[7240]: Command completed with return code 0 and output: OK: success Oct 8 15:21:57 vserv08 nrpe[7240]: Return Code: 0, Output: OK: success Oct 8 15:21:57 vserv08 nrpe[7240]: Connection from 127.0.0.1 closed. I found no further hints in the strace log, but this led me to assume that there is some NRPE weirdness involved, and thus I'm writing here instead of further digging through the system. Any ideas? Cheers, Flo -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https
[Nagios-users] NRPE: Unable to read output (after upgrading sudo to 1.7.2p1-6.el5_5)
Hi, I have been using a check_ldap_fd command on a nagios client without any problem. That command requires superuser permission. After upgrading sudo to 1.7.2p1-6.el5_5, the command stops working. Running the following command on my nagios server always shows the following: [TEST:r...@serv1 ~]# /usr/lib/nagios/plugins/check_nrpe -H 192.168.12.2 -c check_ldap_fd NRPE: Unable to read output This is the command defined in /etc/nagios/nrpe.cfg on the nagios client: command[check_ldap_fd]=/usr/bin/sudo /usr/lib/nagios/plugins/check_ldap_fd -w 250 -c 500 I also made the following changes to /etc/sudoers on the nagios client in order to make the command work: #Defaultsrequiretty nagios ds2 = NOPASSWD:/usr/lib/nagios/plugins/check_ldap_fd Any ideas? Thanks. -- ___ 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] NRPE: Unable to read output (after upgrading sudo to 1.7.2p1-6.el5_5)
I found the same problem with sudo after an update. Seems the comment line in the sudoers file causes a synax with #comment, you need a space, so # comment works ok. Ben On Wed, May 19, 2010 at 5:48 PM, Yungwei Chen yung...@resolvity.com wrote: Hi, I have been using a check_ldap_fd command on a nagios client without any problem. That command requires superuser permission. After upgrading sudo to 1.7.2p1-6.el5_5, the command stops working. Running the following command on my nagios server always shows the following: [TEST:r...@serv1 ~]# /usr/lib/nagios/plugins/check_nrpe -H 192.168.12.2 -c check_ldap_fd NRPE: Unable to read output This is the command defined in /etc/nagios/nrpe.cfg on the nagios client: command[check_ldap_fd]=/usr/bin/sudo /usr/lib/nagios/plugins/check_ldap_fd -w 250 -c 500 I also made the following changes to /etc/sudoers on the nagios client in order to make the command work: #Defaults requiretty nagios ds2 = NOPASSWD:/usr/lib/nagios/plugins/check_ldap_fd Any ideas? Thanks. -- ___ 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 -- Scientology ... is not a religion. - L. Ron Hubbard (Creator of Scientology) -- ___ 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] NRPE: Unable to read output (after upgrading sudo to 1.7.2p1-6.el5_5)
1) do : uname -n the output must match the host defined, in your case ds2 JUST in case put a space between NOPASSWD: and /usr/ 2) make sure nagios has a correct/auth shell (/etc/shells) 3) add the following lines in the sudo file Cmnd_Alias LIST= /usr/bin/sudo -l ALL ALL = NOPASSWD: LIST then as root : su - nagios once you are nagios do a : sudo -l and maybe a : sudo /usr/lib/nagios/plugins/check_ldap_fd -w 250 -c 500 not much... -ls Ben O'Hara boh...@gmail.com wrote at Wed, May 19, 2010 at 10:35:56PM +0200: I found the same problem with sudo after an update. Seems the comment line in the sudoers file causes a synax with #comment, you need a space, so # comment works ok. Ben On Wed, May 19, 2010 at 5:48 PM, Yungwei Chen yung...@resolvity.com wrote: Hi, I have been using a check_ldap_fd command on a nagios client without any problem. That command requires superuser permission. After upgrading sudo to 1.7.2p1-6.el5_5, the command stops working. Running the following command on my nagios server always shows the following: [TEST:r...@serv1 ~]# /usr/lib/nagios/plugins/check_nrpe -H 192.168.12.2 -c check_ldap_fd NRPE: Unable to read output This is the command defined in /etc/nagios/nrpe.cfg on the nagios client: command[check_ldap_fd]=/usr/bin/sudo /usr/lib/nagios/plugins/check_ldap_fd -w 250 -c 500 I also made the following changes to /etc/sudoers on the nagios client in order to make the command work: #Defaults requiretty nagios ds2 = NOPASSWD:/usr/lib/nagios/plugins/check_ldap_fd Any ideas? Thanks. -- ___ 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
[Nagios-users] NRPE: Unable to read output
I wrote a perl plugin that seems to work fine when I run it locally on the remote host as the nagios user, however when I try to execute it via NRPE I get the old familiar nebulous ³NRPE: Unable to read output². I have debugging on for NRPE logging and it doesn¹t tell much more. (Note this is in reverse order is it is out of splunk. IPs are obfuscated) Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 903583 daemon.debug] Connection from X.X.X.X closed. host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 589/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 869297 daemon.debug] Return Code: 1, Output: NRPE: Unable to read output host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 599/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 757686 daemon.debug] Command completed with return code 1 and output: host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 609/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 462736 daemon.debug] Running command: /usr/loca/nagios/libexec/check_scrub_backlog.pl -w 1000 -c 2000 -u -p -i Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 881351 daemon.debug] Host is asking for command 'check_scrub_backlog' to be run... host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 629/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 385967 daemon.debug] Host address is in allowed_hosts host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 639/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 654915 daemon.debug] Connection from X.X.X.X port 34549 host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 649/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 879649 daemon.debug] Handling the connection... The command that is trying to run looks corrected- arguments are being sent correctly. I have tested the command using the same user that NRPE is running as, nagios. I did build in output for error messages in case there were problems like issues with ENV, but obviously they are not making it to NRPE. I confirmed my output text has EOLs. What is especially weird is that the return code makes it back correctly but the output is just ³NRPE: Unable to read output² even as logged by nrpe. The output should look like this, which is what it gets locally when ran: Scrub Backlog Count: 1083 Nothing unusually with that, right? Any help appreciated, thanks. Does anyone have any other suggestions on how I might debug this? Since NRPE is working for all my other plugins -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ 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] NRPE: Unable to read output
I guess I should include the plugin script: #!/usr/bin/perl -w #check for item count in ListingCatlogue URL use POSIX; use strict; use File::Basename; use Getopt::Long; use vars qw( $opt_critical $opt_warning $opt_username $opt_password $opt_instance $opt_help $opt_usage $opt_version ); sub print_usage(); sub print_help(); # # Version and Author info my $author = Matthew Litwin; my $datemod = September 2, 2009; my $version = 0.1.0; # 0.1.0 - initial cannibalization from check_lcs_update.pl my $progname = basename($0); my %ERRORS = ('UNKNOWN' = '-1', 'OK' = '0', 'WARNING' = '1', 'CRITICAL' = '2'); my $sqlplus = '/opt/oracle/product/10gRac/bin/sqlplus'; my $sqlfile = '/usr/local/nagios/libexec/check_scrub_backlog.sql'; Getopt::Long::Configure('bundling'); GetOptions ( c=s = \$opt_critical, critical=s = \$opt_critical, w=s = \$opt_warning, warning=s = \$opt_warning, u=s = \$opt_username, username=s = \$opt_username, p=s = \$opt_password, password=s = \$opt_password, i=s = \$opt_instance, instance=s = \$opt_instance, h = \$opt_help, help = \$opt_help, usage = \$opt_usage, V = \$opt_version,version= \$opt_version ) || die Try `$progname --help' for more information.\n; sub print_usage() { print Usage: $progname -w WARNING -c CRITICAL -u username -p password -i instance\n; print$progname --help\n; print$progname --version\n; } sub print_help() { print $progname - check item count in ListingCatlogue URL\n; print Options are:\n; print -c, --critical\n; print -w, --warning\n; print -u, --username\n; print -p, --password\n; print -i, --instance\n; print -h, --help display this help and exit\n; print --usage display a short usage instruction\n; print -V, --version output version information and exit\n; } if ($opt_help) { print_help(); exit $ERRORS{'UNKNOWN'}; } if ($opt_usage || !($opt_critical $opt_warning $opt_username $opt_password $opt_instance $opt_instance)) { print_usage(); exit $ERRORS{'UNKNOWN'}; } if ($opt_version) { print $progname $version\n; print $author, $datemod\n; exit $ERRORS{'UNKNOWN'}; } if (!-x $sqlplus) { print sqlplus not found or not executable at: $sqlplus\n; exit $ERRORS{'UNKNOWN'}; } if (!-r $sqlfile) { print sql command file not found or not readable at: $sqlfile\n; exit $ERRORS{'UNKNOWN'}; } # This SQL request returns a row count. my $scrubcount=`$sqlplus -S $opt_username/$opt_passwo...@$opt_instance \...@$sqlfile`; if ($? == 0) { chomp($scrubcount); $scrubcount =~ s/^\s+//; if ($scrubcount =~ m/^\d+$/) { print Scrub Backlog Count: $scrubcount\n; my $state; $state=OK; if ($scrubcount = $opt_warning) {$state=WARNING;} if ($scrubcount = $opt_critical) {$state=CRITICAL;} exit $ERRORS{$state}; } else { print Output not a numeric value\n; exit $ERRORS{'UNKNOWN'}; } } else { print sqlplus error: $?\n; exit $ERRORS{'UNKNOWN'}; } On 9/3/09 12:48 PM, Matthew Litwin mlit...@stubhub.com wrote: I wrote a perl plugin that seems to work fine when I run it locally on the remote host as the nagios user, however when I try to execute it via NRPE I get the old familiar nebulous ³NRPE: Unable to read output². I have debugging on for NRPE logging and it doesn¹t tell much more. (Note this is in reverse order is it is out of splunk. IPs are obfuscated) Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 903583 daemon.debug] Connection from X.X.X.X closed. host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 589/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 869297 daemon.debug] Return Code: 1, Output: NRPE: Unable to read output host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 599/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 757686 daemon.debug] Command completed with return code 1 and output: host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 609/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 462736 daemon.debug] Running command: /usr/loca/nagios/libexec/check_scrub_backlog.pl -w 1000 -c 2000 -u -p -i Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 881351 daemon.debug] Host is asking for command 'check_scrub_backlog' to be run... host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 629/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 385967 daemon.debug] Host address is in allowed_hosts
Re: [Nagios-users] NRPE: Unable to read output
Please disregard. I see the typo in the NRPE command path. So sorry! On 9/3/09 12:48 PM, Matthew Litwin mlit...@stubhub.com wrote: I wrote a perl plugin that seems to work fine when I run it locally on the remote host as the nagios user, however when I try to execute it via NRPE I get the old familiar nebulous ³NRPE: Unable to read output². I have debugging on for NRPE logging and it doesn¹t tell much more. (Note this is in reverse order is it is out of splunk. IPs are obfuscated) Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 903583 daemon.debug] Connection from X.X.X.X closed. host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 589/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 869297 daemon.debug] Return Code: 1, Output: NRPE: Unable to read output host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 599/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 757686 daemon.debug] Command completed with return code 1 and output: host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 609/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 462736 daemon.debug] Running command: /usr/loca/nagios/libexec/check_scrub_backlog.pl -w 1000 -c 2000 -u -p -i Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 881351 daemon.debug] Host is asking for command 'check_scrub_backlog' to be run... host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 629/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 385967 daemon.debug] Host address is in allowed_hosts host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 639/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 654915 daemon.debug] Connection from X.X.X.X port 34549 host=sjvp00dbs001.XX.com Options sourcetype=syslog Options source=udp:514 Options 649/3/09 7:27:01.000 PM Sep 3 19:27:01 sjvp00dbs001.XX.com Sep 3 19:27:01 nrpe[12434]: [ID 879649 daemon.debug] Handling the connection... The command that is trying to run looks corrected- arguments are being sent correctly. I have tested the command using the same user that NRPE is running as, nagios. I did build in output for error messages in case there were problems like issues with ENV, but obviously they are not making it to NRPE. I confirmed my output text has EOLs. What is especially weird is that the return code makes it back correctly but the output is just ³NRPE: Unable to read output² even as logged by nrpe. The output should look like this, which is what it gets locally when ran: Scrub Backlog Count: 1083 Nothing unusually with that, right? Any help appreciated, thanks. Does anyone have any other suggestions on how I might debug this? Since NRPE is working for all my other plugins -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ 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 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ 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
[Nagios-users] NRPE: Unable to Read Output???
Hi there, I'm having issues when trying to check a plugin via NRPE... Whenever I run the check command, NRPE returns: Unable to read output. I'm lost... The file permissions are correct, it's executable and owned by the Nagios user... The script runs fine locally. I have double and triple checked the command definition, and that's fine... For reference, here's some output. Sample command and result: nagios]$ libexec/check_oracle.pl -db FSRPRD02 -ch r -w 900 -c 1800 OK: FSRPRD02 Replication is currently 9 seconds behind Live|Replication=9s;900;1800 NRPE command is defined as: command[check_oracle]=/usr/local/nagios/libexec/check_oracle.pl -ch $ARG1$ -db $ARG2$ -w $ARG3$ -c $ARG4$ Permissions on check_oracle.pl are: nagios]$ ls -l libexec/check_oracle.pl -rwxrwxr-x 1 nagios nagios 4371 Mar 6 19:38 libexec/check_oracle.pl NRPE Check command and result is: libexec]$ ./check_nrpe -H fsr-act-db01 -c check_oracle -a r FSRPRD02 900 1800 NRPE: Unable to read output I've restarted NRPE dozens of times, and enabled debugging... however nothing useful shows up in /var/log/messages... Anybody have any ideas??? Cheers Gavin -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H___ 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] NRPE: Unable to Read Output???
On Mar 6, 2009, at 1:44 PM, Gavin Williams wrote: NRPE command is defined as: command[check_oracle]=/usr/local/nagios/libexec/check_oracle.pl -ch $ARG1$ -db $ARG2$ -w $ARG3$ -c $ARG4$ Change this to the following to capture STDERR; you'll probably see something useful. I'm going to bet it's an oracle environment issue. It's come up before and the archives can probably provide further insight (I don't have experience with it beyond this list). command[check_oracle]=/usr/local/nagios/libexec/check_oracle.pl -ch $ARG1$ -db $ARG2$ -w $ARG3$ -c $ARG4$ 21 -- Marc -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ 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
[Nagios-users] NRPE: Unable to read output
I'm trying to use check_nrpe with check_smartmon but I'm getting NRPE: Unable to read output at the Nagios Server. *All other check plugins like check_load and check_procs work fine. * *I'm running the following command from my nagios server to the remote host: * *./check_nrpe -H remotehost.domain.com -c check_smartmon* *and the out put is the following:* *NRPE: Unable to read output* *This is what the remote host logs display:* *Aug 12 11:16:13 *remotehost* xinetd[7151]: START: nrpe pid=7986 from= 198.162.1.1 - Nagios Server IP Address Aug 12 11:16:13 *remotehost* nrpe[7986]: INFO: SSL/TLS initialized. All network traffic will be encrypted. Aug 12 11:16:13 *remotehost* xinetd[7151]: EXIT: nrpe status=0 pid=7986 duration=0(sec)* *When I use the check_smartmon directly in the remote machine as the user nagios and using sudo it works fine:* [EMAIL PROTECTED] plugins]$ sudo /usr/lib64/nagios/plugins/check_smartmon ata -d /dev/sda OK: device is functional and stable (temperature: 33) *If I change the only_from line on /etc/xinetd.d/nrpe file to 127.0.0.1 and I run the following from the remote host I get prompted by a password:* [EMAIL PROTECTED] plugins]$ sudo /usr/lib64/nagios/plugins/check_nrpe -h remotehost.domain.com.latpro.com -c check_smartmon Password: * *The permissions on the device are the following:* [EMAIL PROTECTED] plugins]$ ls -lah /dev/sda brw-rw 1 root disk 8, 0 Jan 8 2008 /dev/sda* *The disk group also has nagios:* disk:x:6:root,nagios *And again the other plugins work fine when they are invoked from the Nagios server. Like the following:* [EMAIL PROTECTED] plugins]$ ./check_nrpe -H remotehost.domain.com -c check_load OK - load average: 2.14, 2.44, 2.72|load1=2.140;15.000;30.000;0; load5=2.440;10.000;25.000;0; load15=2.720;5.000;20.000;0; *I added the following line on my remotehost to the /etc/sudoers:* nagiosALL=(ALL) NOPASSWD: /usr/sbin/smartctl,/usr/lib64/nagios/plugins/check_nrpe,/usr/lib64/nagios/plugins/check_smartmon I also try running the NRPE as adeamon and not with xinetd and I had the same issue. Any inputs? - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ 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] NRPE: Unable to read output
executing check_nrpe via sudo will not accomplish what you want. You will need to either modify the nrpe.cfg to execute commands via sudo, or write a wrapper for check_smartmon. I am not familiar with that plugin, but you may also be able to edit it and prepend /path/to/sudo before it execs smartctl. On 8/12/08, Jake Solid [EMAIL PROTECTED] wrote: I'm trying to use check_nrpe with check_smartmon but I'm getting NRPE: Unable to read output at the Nagios Server. *All other check plugins like check_load and check_procs work fine. * *I'm running the following command from my nagios server to the remote host: * *./check_nrpe -H remotehost.domain.com -c check_smartmon* *and the out put is the following:* *NRPE: Unable to read output* *This is what the remote host logs display:* *Aug 12 11:16:13 *remotehost* xinetd[7151]: START: nrpe pid=7986 from= 198.162.1.1 - Nagios Server IP Address Aug 12 11:16:13 *remotehost* nrpe[7986]: INFO: SSL/TLS initialized. All network traffic will be encrypted. Aug 12 11:16:13 *remotehost* xinetd[7151]: EXIT: nrpe status=0 pid=7986 duration=0(sec)* *When I use the check_smartmon directly in the remote machine as the user nagios and using sudo it works fine:* [EMAIL PROTECTED] plugins]$ sudo /usr/lib64/nagios/plugins/check_smartmon ata -d /dev/sda OK: device is functional and stable (temperature: 33) *If I change the only_from line on /etc/xinetd.d/nrpe file to 127.0.0.1 and I run the following from the remote host I get prompted by a password:* [EMAIL PROTECTED] plugins]$ sudo /usr/lib64/nagios/plugins/check_nrpe -h remotehost.domain.com.latpro.com -c check_smartmon Password: * *The permissions on the device are the following:* [EMAIL PROTECTED] plugins]$ ls -lah /dev/sda brw-rw 1 root disk 8, 0 Jan 8 2008 /dev/sda* *The disk group also has nagios:* disk:x:6:root,nagios *And again the other plugins work fine when they are invoked from the Nagios server. Like the following:* [EMAIL PROTECTED] plugins]$ ./check_nrpe -H remotehost.domain.com -c check_load OK - load average: 2.14, 2.44, 2.72|load1=2.140;15.000;30.000;0; load5=2.440;10.000;25.000;0; load15=2.720;5.000;20.000;0; *I added the following line on my remotehost to the /etc/sudoers:* nagiosALL=(ALL) NOPASSWD: /usr/sbin/smartctl,/usr/lib64/nagios/plugins/check_nrpe,/usr/lib64/nagios/plugins/check_smartmon I also try running the NRPE as adeamon and not with xinetd and I had the same issue. Any inputs? - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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] NRPE: Unable to read output
I dont know if that will work, there is a specific option inside nrpe.cfg for executing commands via sudo: # COMMAND PREFIX # This option allows you to prefix all commands with a user-defined string. # A space is automatically added between the specified prefix string and the # command line from the command definition. # # *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! *** # Usage scenario: # Execute restricted commmands using sudo. For this to work, you need to add # the nagios user to your /etc/sudoers. An example entry for alllowing # execution of the plugins from might be: # # nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/ # # This lets the nagios user run all commands in that directory (and only them) # without asking for a password. If you do this, make sure you don't give # random users write access to that directory or its contents! # command_prefix=/usr/bin/sudo Also make sure you can run the command exactly like nrpe does as the user nrpe is running as. As for your bolded question, go chmod 644 check_load and try to run it, it will give you the same error. It just means that the script executed but didn't respond with recognized output. On 8/12/08, Jake Solid [EMAIL PROTECTED] wrote: I did modified the nrpe.cfg to execute commands via sudo by adding the following line: *command[check_smartmon]=/usr/bin/sudo /usr/lib64/nagios/plugins/check_smartmon ata -d /dev/sda* *Why I'm able to invoke the following plugins from the nagios server using check_nrpe but when invoking check_smartmon I get *NRPE: Unable to read output*?* command[check_users]=/usr/lib64/nagios/plugins/check_users -w 8 -c 10 command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20 command[check_disk1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/VolGroup00-LogVol00 command[check_disk2]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/VolGroup00-LogVol01 command[check_disk3]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/VolGroup00-LogVol02 command[check_disk4]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/VolGroup01-LogVol00 command[check_md]=/usr/lib64/nagios/plugins/check_swraid command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 200 -c 300 On Tue, Aug 12, 2008 at 12:25 PM, [EMAIL PROTECTED] wrote: executing check_nrpe via sudo will not accomplish what you want. You will need to either modify the nrpe.cfg to execute commands via sudo, or write a wrapper for check_smartmon. I am not familiar with that plugin, but you may also be able to edit it and prepend /path/to/sudo before it execs smartctl. On 8/12/08, Jake Solid [EMAIL PROTECTED] wrote: I'm trying to use check_nrpe with check_smartmon but I'm getting NRPE: Unable to read output at the Nagios Server. *All other check plugins like check_load and check_procs work fine. * *I'm running the following command from my nagios server to the remote host: * *./check_nrpe -H remotehost.domain.com -c check_smartmon* *and the out put is the following:* *NRPE: Unable to read output* *This is what the remote host logs display:* *Aug 12 11:16:13 *remotehost* xinetd[7151]: START: nrpe pid=7986 from= 198.162.1.1 - Nagios Server IP Address Aug 12 11:16:13 *remotehost* nrpe[7986]: INFO: SSL/TLS initialized. All network traffic will be encrypted. Aug 12 11:16:13 *remotehost* xinetd[7151]: EXIT: nrpe status=0 pid=7986 duration=0(sec)* *When I use the check_smartmon directly in the remote machine as the user nagios and using sudo it works fine:* [EMAIL PROTECTED] plugins]$ sudo /usr/lib64/nagios/plugins/check_smartmon ata -d /dev/sda OK: device is functional and stable (temperature: 33) *If I change the only_from line on /etc/xinetd.d/nrpe file to 127.0.0.1and I run the following from the remote host I get prompted by a password:* [EMAIL PROTECTED] plugins]$ sudo /usr/lib64/nagios/plugins/check_nrpe -h remotehost.domain.com.latpro.com -c check_smartmon Password: * *The permissions on the device are the following:* [EMAIL PROTECTED] plugins]$ ls -lah /dev/sda brw-rw 1 root disk 8, 0 Jan 8 2008 /dev/sda* *The disk group also has nagios:* disk:x:6:root,nagios *And again the other plugins work fine when they are invoked from the Nagios server. Like the following:* [EMAIL PROTECTED] plugins]$ ./check_nrpe -H remotehost.domain.com -c check_load OK - load average: 2.14, 2.44, 2.72|load1=2.140;15.000;30.000;0; load5=2.440;10.000;25.000;0; load15=2.720;5.000;20.000;0; *I added the following line on my remotehost to the /etc/sudoers:* nagiosALL=(ALL) NOPASSWD: /usr/sbin/smartctl,/usr/lib64/nagios/plugins/check_nrpe,/usr/lib64/nagios/plugins/check_smartmon I also try running the NRPE as adeamon and
Re: [Nagios-users] NRPE: Unable to read output
The following line will make all commands use sudo: command_prefix=/usr/bin/sudo I remove the comment for command_prefix=/usr/bin/sudo and add the following to the sudoers file: nagiosALL=(ALL) NOPASSWD: /usr/sbin/smartctl,/usr/lib64/nagios/plugins/ Now, I get the NRPE: Unable to read output for any plugin that gets invoked. The permissions of check_smartmon on the remote server are the same as the other plugins that are working. -rwxr-xr-x 1 root root 8.4K Aug 6 13:02 check_smartmon But I'm still not able to successfully invoke check_smartmon with check_nrpe from the nagios server. On Tue, Aug 12, 2008 at 2:25 PM, [EMAIL PROTECTED] wrote: I dont know if that will work, there is a specific option inside nrpe.cfg for executing commands via sudo: # COMMAND PREFIX # This option allows you to prefix all commands with a user-defined string. # A space is automatically added between the specified prefix string and the # command line from the command definition. # # *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! *** # Usage scenario: # Execute restricted commmands using sudo. For this to work, you need to add # the nagios user to your /etc/sudoers. An example entry for alllowing # execution of the plugins from might be: # # nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/ # # This lets the nagios user run all commands in that directory (and only them) # without asking for a password. If you do this, make sure you don't give # random users write access to that directory or its contents! # command_prefix=/usr/bin/sudo Also make sure you can run the command exactly like nrpe does as the user nrpe is running as. As for your bolded question, go chmod 644 check_load and try to run it, it will give you the same error. It just means that the script executed but didn't respond with recognized output. On 8/12/08, Jake Solid [EMAIL PROTECTED] wrote: I did modified the nrpe.cfg to execute commands via sudo by adding the following line: *command[check_smartmon]=/usr/bin/sudo /usr/lib64/nagios/plugins/check_smartmon ata -d /dev/sda* *Why I'm able to invoke the following plugins from the nagios server using check_nrpe but when invoking check_smartmon I get *NRPE: Unable to read output*?* command[check_users]=/usr/lib64/nagios/plugins/check_users -w 8 -c 10 command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20 command[check_disk1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/VolGroup00-LogVol00 command[check_disk2]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/VolGroup00-LogVol01 command[check_disk3]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/VolGroup00-LogVol02 command[check_disk4]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/VolGroup01-LogVol00 command[check_md]=/usr/lib64/nagios/plugins/check_swraid command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 200 -c 300 On Tue, Aug 12, 2008 at 12:25 PM, [EMAIL PROTECTED] wrote: executing check_nrpe via sudo will not accomplish what you want. You will need to either modify the nrpe.cfg to execute commands via sudo, or write a wrapper for check_smartmon. I am not familiar with that plugin, but you may also be able to edit it and prepend /path/to/sudo before it execs smartctl. On 8/12/08, Jake Solid [EMAIL PROTECTED] wrote: I'm trying to use check_nrpe with check_smartmon but I'm getting NRPE: Unable to read output at the Nagios Server. *All other check plugins like check_load and check_procs work fine. * *I'm running the following command from my nagios server to the remote host: * *./check_nrpe -H remotehost.domain.com -c check_smartmon* *and the out put is the following:* *NRPE: Unable to read output* *This is what the remote host logs display:* *Aug 12 11:16:13 *remotehost* xinetd[7151]: START: nrpe pid=7986 from= 198.162.1.1 - Nagios Server IP Address Aug 12 11:16:13 *remotehost* nrpe[7986]: INFO: SSL/TLS initialized. All network traffic will be encrypted. Aug 12 11:16:13 *remotehost* xinetd[7151]: EXIT: nrpe status=0 pid=7986 duration=0(sec)* *When I use the check_smartmon directly in the remote machine as the user nagios and using sudo it works fine:* [EMAIL PROTECTED] plugins]$ sudo /usr/lib64/nagios/plugins/check_smartmon ata -d /dev/sda OK: device is functional and stable (temperature: 33) *If I change the only_from line on /etc/xinetd.d/nrpe file to 127.0.0.1and I run the following from the remote host I get prompted by a password:* [EMAIL PROTECTED] plugins]$ sudo /usr/lib64/nagios/plugins/check_nrpe -h remotehost.domain.com.latpro.com -c check_smartmon Password: * *The
[Nagios-users] NRPE: Unable to read output
Hi when i run the below command i get NRPE: Unable to read output sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_total_procs NRPE: Unable to read output Thanks and Regards Kaushal - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ 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] NRPE: Unable to read output
I did the the same thing the other day. Make sure the nrpe.cfg is readable by the nrpe daemon. Make sure that the path to the command is correct. Thanks Steve Pribyl Senior Infrastructure Practitioner Peel, Inc 990 Grove St. Suite 204 Evanston, IL 60201 Phone: 847-424-0954 ex 14 Cell: 847-343-2349 Fax: 847-424-0986 [EMAIL PROTECTED] On 05/28/2008 01:38 PM, Kaushal Shriyan wrote: Hi when i run the below command i get NRPE: Unable to read output sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_total_procs NRPE: Unable to read output Thanks and Regards Kaushal - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] NRPE: Unable to read output
On Thu, May 29, 2008 at 12:13 AM, Steve Pribyl [EMAIL PROTECTED] wrote: I did the the same thing the other day. Make sure the nrpe.cfg is readable by the nrpe daemon. Make sure that the path to the command is correct. Thanks Steve Pribyl Senior Infrastructure Practitioner Peel, Inc 990 Grove St. Suite 204 Evanston, IL 60201 Phone: 847-424-0954 ex 14 Cell: 847-343-2349 Fax: 847-424-0986 [EMAIL PROTECTED] On 05/28/2008 01:38 PM, Kaushal Shriyan wrote: Hi when i run the below command i get NRPE: Unable to read output sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_total_procs NRPE: Unable to read output Thanks and Regards Kaushal - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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 Hi Steve kaushal$ ls -l /etc/nagios/nrpe.cfg -rw-r- 1 nagios nagios 3898 May 28 07:54 /etc/nagios/nrpe.cfg kaushal$ [I--] [ ~] net-analyzer/nagios-2.9 (0) [I--] [ ~] net-analyzer/nagios-nrpe-2.8.1 (0) OS: Gentoo Linux I am able to see the output for rest of the commands, only for check_total_procs I get *NRPE: Unable to read output* kaushal$ sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_users USERS OK - 2 users currently logged in kaushal$ sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_load OK - load average: 0.09, 0.15, 0.16 kaushal$ sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_disk1 DISK OK [101168544 kB (86%) free on /dev/sda2] kaushal$ sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_mysql Uptime: 1814627 Threads: 4 Questions: 21736723 Slow queries: 2 Opens: 43 Flush tables: 3 Open tables: 22 Queries per second avg: 11.979 kaushal$ sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_nrpe_status OK - NRPE is alive kaushal$ sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_total_procs *NRPE: Unable to read output* Any ideas Thanks and Regards Kaushal Please let me know if i am missing something - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ 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] NRPE: Unable to read output
On May 28, 2008, at 1:38 PM, Kaushal Shriyan wrote: Hi when i run the below command i get NRPE: Unable to read output sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_total_procs NRPE: Unable to read output NRPE provides a debug option for problems such as this. There could be many causes and you haven't provided any information to say which. If you need further assistance, please detail NRPE version How installed (source or package; which package) How is it being run (inetd, xinetd, daemon) (x)inetd configuration if that's being used. any (x)inetd errors being generated if that's being used. NRPE debug output when check is executed. NRPE configuration for the command Example test run of the check_total_procs command run on the destination host as the NRPE user. and, last but certainly not least, any troubleshooting/googleing you've already done so that we don't repeat the ground you've already covered. -- Marc - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] NRPE: Unable to read output
On Thu, May 29, 2008 at 12:22 AM, Marc Powell [EMAIL PROTECTED] wrote: On May 28, 2008, at 1:38 PM, Kaushal Shriyan wrote: Hi when i run the below command i get NRPE: Unable to read output sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_total_procs NRPE: Unable to read output NRPE provides a debug option for problems such as this. There could be many causes and you haven't provided any information to say which. If you need further assistance, please detail NRPE version How installed (source or package; which package) How is it being run (inetd, xinetd, daemon) (x)inetd configuration if that's being used. any (x)inetd errors being generated if that's being used. NRPE debug output when check is executed. NRPE configuration for the command Example test run of the check_total_procs command run on the destination host as the NRPE user. and, last but certainly not least, any troubleshooting/googleing you've already done so that we don't repeat the ground you've already covered. -- Marc - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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 Hi Marc I have enabled debug=1, But not able to see anything in the syslog when i restart the nrpe using the below command sudo /etc/init.d/nrpe restart Any further clue Thanks and Regards Kaushal - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ 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] NRPE: Unable to read output
(snip) when i run the below command i get NRPE: Unable to read output sudo -u nagios /usr/nagios/libexec/check_nrpe -H localhost -c check_total_procs NRPE: Unable to read output (/snip) is check_total_procs readable / executable by the nagios user at the monitored server? -- Saludos, Germán Delivering common sense since 1969. 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] NRPE: Unable to read output
On May 28, 2008, at 1:56 PM, Kaushal Shriyan wrote: On Thu, May 29, 2008 at 12:22 AM, Marc Powell [EMAIL PROTECTED] wrote: NRPE provides a debug option for problems such as this. There could be many causes and you haven't provided any information to say which. If you need further assistance, please detail NRPE version How installed (source or package; which package) How is it being run (inetd, xinetd, daemon) (x)inetd configuration if that's being used. any (x)inetd errors being generated if that's being used. NRPE debug output when check is executed. NRPE configuration for the command Example test run of the check_total_procs command run on the destination host as the NRPE user. and, last but certainly not least, any troubleshooting/googleing you've already done so that we don't repeat the ground you've already covered. Hi Marc I have enabled debug=1, But not able to see anything in the syslog when i restart the nrpe using the below command sudo /etc/init.d/nrpe restart Any further clue No, not until you provide the information that's already been asked for. That will pretty much eliminate common problems. You're essentially asking us to make wild guesses based on no information and keep trying when they're wrong. It's a waste of time for all of us. I've seen 2 of the 10 in this thread; nrpe version and (no) nrpe debug output. -- Marc - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] NRPE: Unable to read output
Hi Thomas, Thomas Guyot-Sionnest schrieb: If you're trying to run the plugin locally as root then try as the nagios user instead (or whichever user nrpe runs as). I.e.: Actually, it doesn't matter, running the check as root as well as nagios gives the same result. I su'ed to nagios in the previous example, but when using root directly, it doesn't work either. I doubt it would be caused by the missing newline, but if you think so you can certainly add one in the plugin since it's written in perl... Certainly ;-) ... But that didn't do the trick, either unfortunately. Which version of Nrpe are you using? NRPE is v2.12, nagios-plugins are the latest also. Thanks for giving some ideas, alas - the problem persists... Greetz, Marcus - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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] NRPE: Unable to read output
-Original Message- From: [EMAIL PROTECTED] [mailto:nagios-users- [EMAIL PROTECTED] On Behalf Of Marcus Sent: Friday, May 16, 2008 4:06 AM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] NRPE: Unable to read output Hi Folks, i'm trying to get a plugin for openvpn (http://www.nagiosexchange.org/cgi-bin/pages/Detailed/1315.html) to work with nrpe, but it gives me the dreaded NRPE: Unable to read output-error. Thanks for including where you got the plugin. command[check_vpn]=/usr/local/nagios/libexec/check_openvpn -H 127.0.0.1 -p 1195 -P mypwd -n When i issue [EMAIL PROTECTED]:/usr/local/nagios/libexec /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_vpn results in NRPE: Unable to read output Can anybody please give me a hint whats going wrong here. :-/ Try redirecting its output to a file so you can see the error output-- command[check_vpn]=/usr/local/nagios/libexec/check_openvpn -H 127.0.0.1 -p 1195 -P mypwd -n /tmp/output 21 -- Marc - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ 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
[Nagios-users] NRPE: Unable to read output
hello all i use nagios to monitoring smtp server on debian (postfix), and i make a test to reboot this service when he shutdown with npre. example: /usr/local/nagios/libexec/check_npre -H smtp_server -c script_to_reboot_postfix when i send this i have this mistake : NRPE: Unable to read output please help me __ Do You Yahoo!? En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités http://mail.yahoo.fr Yahoo! Mail - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ 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] NRPE: Unable to read output
-Original Message- From: [EMAIL PROTECTED] [mailto:nagios-users- [EMAIL PROTECTED] On Behalf Of kermit le kermit Sent: Friday, May 02, 2008 8:27 AM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] NRPE: Unable to read output hello all i use nagios to monitoring smtp server on debian (postfix), and i make a test to reboot this service when he shutdown with npre. example: /usr/local/nagios/libexec/check_npre -H smtp_server -c script_to_reboot_postfix when i send this i have this mistake : NRPE: Unable to read output check_nrpe expects the script it calls to be a nagios plugin and to behave appropriately. The Developer Guidelines specify that nagios plugins must output (at least) one line of text and to exit with the proper exit code. It appears your script does not output any text, at the least. It also appears that you are going to try to use check_nrpe as an event_handler instead of its intended purpose of running check plugins. There aren't any inherent reasons that I can think of why that wouldn't work and since nagios doesn't check for errors from the execution of an event_handler, the above error probably isn't critical. -- Marc - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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] NRPE: Unable to read output for check_procs
Hi, Is there really a i before the /usr/lib/... in your check_procs command definition ? Other question : is any other nrpe command working ? Regards -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Joines Sent: Friday, December 07, 2007 4:38 PM To: Nagios Users Subject: [Nagios-users] NRPE: Unable to read output for check_procs I'm running Nagios 2.9 and NRPE 2.8.1 on Ubuntu 7.10 Gutsy. On the box running NRPE, I have check_procs defined in /etc/nagios/nrpe.cfg as: command[check_procs]=i/usr/lib/nagios/plugins/check_procs -w 250 -c 400 and I'm running NRPE as a daemon via /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d as the user nagios. When I run the check locally on the NRPE box it works just fine: [EMAIL PROTECTED]:~# sudo -u nagios /usr/lib/nagios/plugins/check_procs PROCS OK: 78 processes [EMAIL PROTECTED]:~# sudo -u nagios /usr/lib/nagios/plugins/check_procs -w 250 -c 400 PROCS OK: 78 processes On the Nagios box I have the service defined in /etc/nagios2/conf.d/box02_nagios2.cfg as: define service{ use generic-service host_namebox02 service_description Total Processes check_commandcheck_nrpe_1arg!check_procs } However, both the web interface and the command line show Unable to read output: [EMAIL PROTECTED]:~# /usr/lib/nagios/plugins/check_nrpe -H box02.sub.dom.top -c check_procs NRPE: Unable to read output [EMAIL PROTECTED]:~# Most of the other NRPE checks defined for box02 work as expected. Any ideas? Jason Joines = - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ 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 - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ 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] NRPE: Unable to read output for check_procs
SCHAER Frederic wrote: Hi, Is there really a i before the /usr/lib/... in your check_procs command definition ? Other question : is any other nrpe command working ? Regards -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Joines Sent: Friday, December 07, 2007 4:38 PM To: Nagios Users Subject: [Nagios-users] NRPE: Unable to read output for check_procs I'm running Nagios 2.9 and NRPE 2.8.1 on Ubuntu 7.10 Gutsy. On the box running NRPE, I have check_procs defined in /etc/nagios/nrpe.cfg as: command[check_procs]=i/usr/lib/nagios/plugins/check_procs -w 250 -c 400 and I'm running NRPE as a daemon via /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d as the user nagios. When I run the check locally on the NRPE box it works just fine: [EMAIL PROTECTED]:~# sudo -u nagios /usr/lib/nagios/plugins/check_procs PROCS OK: 78 processes [EMAIL PROTECTED]:~# sudo -u nagios /usr/lib/nagios/plugins/check_procs -w 250 -c 400 PROCS OK: 78 processes On the Nagios box I have the service defined in /etc/nagios2/conf.d/box02_nagios2.cfg as: define service{ use generic-service host_namebox02 service_description Total Processes check_commandcheck_nrpe_1arg!check_procs } However, both the web interface and the command line show Unable to read output: [EMAIL PROTECTED]:~# /usr/lib/nagios/plugins/check_nrpe -H box02.sub.dom.top -c check_procs NRPE: Unable to read output [EMAIL PROTECTED]:~# Most of the other NRPE checks defined for box02 work as expected. Any ideas? Jason Joines = Unfortunately, yes. I can't believe I missed that. Thanks. Jason === - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ 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
[Nagios-users] NRPE: Unable to read output for check_procs
I'm running Nagios 2.9 and NRPE 2.8.1 on Ubuntu 7.10 Gutsy. On the box running NRPE, I have check_procs defined in /etc/nagios/nrpe.cfg as: command[check_procs]=i/usr/lib/nagios/plugins/check_procs -w 250 -c 400 and I'm running NRPE as a daemon via /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d as the user nagios. When I run the check locally on the NRPE box it works just fine: [EMAIL PROTECTED]:~# sudo -u nagios /usr/lib/nagios/plugins/check_procs PROCS OK: 78 processes [EMAIL PROTECTED]:~# sudo -u nagios /usr/lib/nagios/plugins/check_procs -w 250 -c 400 PROCS OK: 78 processes On the Nagios box I have the service defined in /etc/nagios2/conf.d/box02_nagios2.cfg as: define service{ use generic-service host_namebox02 service_description Total Processes check_commandcheck_nrpe_1arg!check_procs } However, both the web interface and the command line show Unable to read output: [EMAIL PROTECTED]:~# /usr/lib/nagios/plugins/check_nrpe -H box02.sub.dom.top -c check_procs NRPE: Unable to read output [EMAIL PROTECTED]:~# Most of the other NRPE checks defined for box02 work as expected. Any ideas? Jason Joines = - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ 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
[Nagios-users] NRPE: Unable to read output
Hello, I'm trying to use the NRPE package to monitor the resources of remote computers. I'm using Fedora Core 3 as one of my clients with the following packages: nagios-plugins-nrpe-2.5.2-1.fc3.rf nagios-nrpe-2.5.2-1.fc3.rf When I test from this fedora client machine I get the following error: [EMAIL PROTECTED] ./check_nrpe -H mydomain.org -c check_load NRPE: Unable to read output This is the content of the /etc/xinetd.d/nrpe file: service nrpe { flags = REUSE type= UNLISTED port= 5666 socket_type = stream wait= no user= nagios group = nagios server = /usr/sbin/nrpe server_args = -c /etc/nagios/nrpe.cfg --inetd log_on_failure += USERID disable = no only_from = x.x.x.x } The x.x.x.x isthe IP of the client machine since I'm doing testing. I will change it later to the monitor machine that runs nagios. This is the content of the /etc/nagios/nrpe.cfg pid_file=/var/run/nrpe.pid server_port=5666 nrpe_user=nagios nrpe_group=nagios dont_blame_nrpe=0 debug=1 command_timeout=60 command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10 command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20 command[check_disk1]=/usr/lib/nagios/plugins/check_disk -w 20 -c 10 -p /dev/hda1 command[check_disk2]=/usr/lib/nagios/plugins/check_disk -w 20 -c 10 -p /dev/hdb1 command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200 This is the content of the /var/log/secure log: May 11 10:57:48 hostname xinetd[29902]: START: nrpe pid=30509 from=x.x.x.x This is what I get when restarting the nrpe service: Shutting down Nagios NRPE daemon (nrpe): [FAILED] Starting Nagios NRPE daemon (nrpe):[ OK ] This is what the /var/log/messages log is saying when trying to restart the nrpe service: May 11 11:05:06 hostname nrpe: nrpe shutdown failed May 11 11:05:06 hostname nrpe[30554]: INFO: SSL/TLS initialized. All network traffic will be encrypted. May 11 11:05:06 hostname nrpe[30555]: Starting up daemon May 11 11:05:06 hostname nrpe[30555]: Network server bind failure (98: Address already in use) May 11 11:05:06 hostname nrpe: nrpe startup succeeded When I do a ps -aux | grep nrpe I dont see the deamon by the name nrpe running but when I do a ps for xinetd, xinetd is running I installed this package on othermachines I I get the same problem. Also, the only plugin listed under /usr/lib/nagios/plugins/ is check_nrpe Do i need to see other plugins listed like check_load or check_disk. Or these are only switches that are used by check_nrpe? If this is a permission issue which I dont think so because when installing these packes they should take care of the permissions and ownership, can someone provide me with all the paths and permissions of each file, how they should look like? Any inputs? THANKS! - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ 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] NRPE unable to read output
no the server is RHEL4 (unfortunately, puke) There is no jailing going on. All my nagios plugins, both normal and using sudo work via the nrpe on the remote server. My only thought is that the plugin itself does not have a tty and that perhaps this is causing this specific plugin to fail Hari Sekhon Andy Shellam (Mailing Lists) wrote: Another stab in the dark... the NRPE agent isn't inside a BSD jail is it? My Nagios host refuses to read NRPE's output in a machine that's jailed :( Andy. Hari Sekhon wrote: Thanks for the reply, I just tried that but unfortunately it still gave the same result. I have another sudo /etc/nagios/plugin and that works. Also, su-ing to nagios and then running the command by hand works. so I'm still stuck Hari Sekhon - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ 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
[Nagios-users] NRPE unable to read output
Hi, I'm using NRPE to execute checks on remote hosts and am have problems with one plugin on just one machine. I have the plugin in the configuration of nrpe and execute /usr/nagios/libexec/check_nrpe -H hostname -c check_plugin NRPE: Unable to read output The definition of the command call in nrpe.cfg is as follows: command[check_plugin]=sudo /etc/nagios/check_plugin and I have the following line in /etc/sudoers: nagios ALL=(ALL) NOPASSWD: /etc/nagios/check_plugin NRPE is running as the nagios user. When logged in as root I can do su - nagios sudo /etc/nagios/check_plugin OK: test passed so I don't understand why it is saying no output. I tried changing the nrpe.cfg to have /tmp/output.log 21 at the end of it but the file /tmp/output.log was not created so I assume that there really was no output when run from the check_nrpe command. This works on all my other servers (most of which are Gentoo) and this one is RHEL4. SELinux is disabled. I can execute all other nrpe checks correctly on this server including another one which also uses sudo. The difference in Distro is the only thing I can think of but it even works from the command line. I am using nrpe 2.6. I have racked my brains but can't think of anything else. Any ideas on this? -h -- Hari Sekhon - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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] NRPE unable to read output
I know that nrpe works, I run over 100 checks via nrpe, and on this host all other nrpe checks work. I don't know if it's really the sudo in the line because I have another line which says command[check_another_plugin]=sudo /etc/nagios/another_plugin and this works fine when called via nrpe as such check_nrpe -H hostname -c check_another_plugin OK: test ok If sudo was the problem, I would expect both checks to fail, but the other one works fine. Also, I need to run the check with sudo because this check will not work without root privs and my nrpe runs under the nagios user. -h Hari Sekhon Lane, Jim wrote: Hari: I think your problem is with the sudo in the line command[check_plugin]=sudo /etc/nagios/check_plugin Try it as command[check_plugin]=/etc/nagios/check_plugin and see how you get on. I run NRPE plugins as above on my systems and they work fine. HTH Jim Lane -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hari Sekhon Sent: February 21, 2007 8:04 AM To: Nagios Users mailinglist Subject: [Nagios-users] NRPE unable to read output Hi, I'm using NRPE to execute checks on remote hosts and am have problems with one plugin on just one machine. I have the plugin in the configuration of nrpe and execute /usr/nagios/libexec/check_nrpe -H hostname -c check_plugin NRPE: Unable to read output The definition of the command call in nrpe.cfg is as follows: command[check_plugin]=sudo /etc/nagios/check_plugin and I have the following line in /etc/sudoers: nagios ALL=(ALL) NOPASSWD: /etc/nagios/check_plugin NRPE is running as the nagios user. When logged in as root I can do su - nagios sudo /etc/nagios/check_plugin OK: test passed so I don't understand why it is saying no output. I tried changing the nrpe.cfg to have /tmp/output.log 21 at the end of it but the file /tmp/output.log was not created so I assume that there really was no output when run from the check_nrpe command. This works on all my other servers (most of which are Gentoo) and this one is RHEL4. SELinux is disabled. I can execute all other nrpe checks correctly on this server including another one which also uses sudo. The difference in Distro is the only thing I can think of but it even works from the command line. I am using nrpe 2.6. I have racked my brains but can't think of anything else. Any ideas on this? -h - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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] NRPE unable to read output
I had this problem, and had to put the full path to sudo (/usr/bin/sudo) in nrpe's config. HTH Andy. Hari Sekhon wrote: I know that nrpe works, I run over 100 checks via nrpe, and on this host all other nrpe checks work. I don't know if it's really the sudo in the line because I have another line which says command[check_another_plugin]=sudo /etc/nagios/another_plugin and this works fine when called via nrpe as such check_nrpe -H hostname -c check_another_plugin OK: test ok If sudo was the problem, I would expect both checks to fail, but the other one works fine. Also, I need to run the check with sudo because this check will not work without root privs and my nrpe runs under the nagios user. -h Hari Sekhon Lane, Jim wrote: Hari: I think your problem is with the sudo in the line command[check_plugin]=sudo /etc/nagios/check_plugin Try it as command[check_plugin]=/etc/nagios/check_plugin and see how you get on. I run NRPE plugins as above on my systems and they work fine. HTH Jim Lane -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hari Sekhon Sent: February 21, 2007 8:04 AM To: Nagios Users mailinglist Subject: [Nagios-users] NRPE unable to read output Hi, I'm using NRPE to execute checks on remote hosts and am have problems with one plugin on just one machine. I have the plugin in the configuration of nrpe and execute /usr/nagios/libexec/check_nrpe -H hostname -c check_plugin NRPE: Unable to read output The definition of the command call in nrpe.cfg is as follows: command[check_plugin]=sudo /etc/nagios/check_plugin and I have the following line in /etc/sudoers: nagios ALL=(ALL) NOPASSWD: /etc/nagios/check_plugin NRPE is running as the nagios user. When logged in as root I can do su - nagios sudo /etc/nagios/check_plugin OK: test passed so I don't understand why it is saying no output. I tried changing the nrpe.cfg to have /tmp/output.log 21 at the end of it but the file /tmp/output.log was not created so I assume that there really was no output when run from the check_nrpe command. This works on all my other servers (most of which are Gentoo) and this one is RHEL4. SELinux is disabled. I can execute all other nrpe checks correctly on this server including another one which also uses sudo. The difference in Distro is the only thing I can think of but it even works from the command line. I am using nrpe 2.6. I have racked my brains but can't think of anything else. Any ideas on this? -h - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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 !DSPAM:37,45dc4dfa18514730279235! -- Andy Shellam NetServe Support Team the Mail Network an alternative in a standardised world p: +44 (0) 121 288 0832/0839 m: +44 (0) 7818 000834 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ 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] NRPE unable to read output
Thanks for the reply, I just tried that but unfortunately it still gave the same result. I have another sudo /etc/nagios/plugin and that works. Also, su-ing to nagios and then running the command by hand works. so I'm still stuck Hari Sekhon Andy Shellam (Mailing Lists) wrote: I had this problem, and had to put the full path to sudo (/usr/bin/sudo) in nrpe's config. HTH Andy. Hari Sekhon wrote: I know that nrpe works, I run over 100 checks via nrpe, and on this host all other nrpe checks work. I don't know if it's really the sudo in the line because I have another line which says command[check_another_plugin]=sudo /etc/nagios/another_plugin and this works fine when called via nrpe as such check_nrpe -H hostname -c check_another_plugin OK: test ok If sudo was the problem, I would expect both checks to fail, but the other one works fine. Also, I need to run the check with sudo because this check will not work without root privs and my nrpe runs under the nagios user. -h Hari Sekhon Lane, Jim wrote: Hari: I think your problem is with the sudo in the line command[check_plugin]=sudo /etc/nagios/check_plugin Try it as command[check_plugin]=/etc/nagios/check_plugin and see how you get on. I run NRPE plugins as above on my systems and they work fine. HTH Jim Lane -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hari Sekhon Sent: February 21, 2007 8:04 AM To: Nagios Users mailinglist Subject: [Nagios-users] NRPE unable to read output Hi, I'm using NRPE to execute checks on remote hosts and am have problems with one plugin on just one machine. I have the plugin in the configuration of nrpe and execute /usr/nagios/libexec/check_nrpe -H hostname -c check_plugin NRPE: Unable to read output The definition of the command call in nrpe.cfg is as follows: command[check_plugin]=sudo /etc/nagios/check_plugin and I have the following line in /etc/sudoers: nagios ALL=(ALL) NOPASSWD: /etc/nagios/check_plugin NRPE is running as the nagios user. When logged in as root I can do su - nagios sudo /etc/nagios/check_plugin OK: test passed so I don't understand why it is saying no output. I tried changing the nrpe.cfg to have /tmp/output.log 21 at the end of it but the file /tmp/output.log was not created so I assume that there really was no output when run from the check_nrpe command. This works on all my other servers (most of which are Gentoo) and this one is RHEL4. SELinux is disabled. I can execute all other nrpe checks correctly on this server including another one which also uses sudo. The difference in Distro is the only thing I can think of but it even works from the command line. I am using nrpe 2.6. I have racked my brains but can't think of anything else. Any ideas on this? -h - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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 !DSPAM:37,45dc4dfa18514730279235! -- Andy Shellam NetServe Support Team the Mail Network an alternative in a standardised world p: +44 (0) 121 288 0832/0839 m: +44 (0) 7818 000834 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https
Re: [Nagios-users] NRPE unable to read output
Another stab in the dark... the NRPE agent isn't inside a BSD jail is it? My Nagios host refuses to read NRPE's output in a machine that's jailed :( Andy. Hari Sekhon wrote: Thanks for the reply, I just tried that but unfortunately it still gave the same result. I have another sudo /etc/nagios/plugin and that works. Also, su-ing to nagios and then running the command by hand works. so I'm still stuck Hari Sekhon - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ 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
[Nagios-users] NRPE: Unable to read output
Hi folks, I'm using nrpe 1.9 on FreeBSD 6.x and I'm failing to get a remote script to work. It seems that no perl script works, but I can get compiled plug-ins to work. The result is, which invoked on the nagios server is: $ ./check_nrpe -H app09 -c check_raid_dell NRPE: Unable to read output On the remote machine, app09, I get: $ perl check_raid_dell RAID_DELL CRITICAL: RAID is critical. $ I know that a value is being returned: $ echo $? 2 $ It's as if the remote script is inappropriate for use with nrpe. I can get other scripts to work: $ ./check_nrpe -H app09 -c check_users USERS OK - 1 users currently logged in |users=1;5;10;0 $ ./check_nrpe -H app09 -c check_load OK - load average: 0.00, 0.05, 0.06|load1=0.003;15.000;30.000;0; load5=0.046;10.000;25.000;0; load15=0.061;5.000;20.000;0; FWIW, both of the above scripts are binaries: $ file check_load check_users check_raid_dell check_load: ELF 64-bit LSB executable, AMD x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped check_users: ELF 64-bit LSB executable, AMD x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped check_raid_dell: perl script text I have confirmed that the user that nrpe is running as can execute the command: # su -m -c nagios nagios -c cd /usr/local/libexec/nagios perl check_raid_dell RAID_DELL CRITICAL: RAID is critical. Ideas? Suggestions? Plans? -- Dan Langille : Software Developer looking for work my resume: http://www.freebsddiary.org/dan_langille.php PGCon - The PostgreSQL Conference - http://www.pgcon.org/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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] NRPE: Unable to read output
What does the nrpe.cfg definition for your 'check_raid_dell' command look like? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Langille Sent: Monday, January 15, 2007 4:09 PM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] NRPE: Unable to read output Hi folks, I'm using nrpe 1.9 on FreeBSD 6.x and I'm failing to get a remote script to work. It seems that no perl script works, but I can get compiled plug-ins to work. The result is, which invoked on the nagios server is: $ ./check_nrpe -H app09 -c check_raid_dell NRPE: Unable to read output On the remote machine, app09, I get: $ perl check_raid_dell RAID_DELL CRITICAL: RAID is critical. $ I know that a value is being returned: $ echo $? 2 $ It's as if the remote script is inappropriate for use with nrpe. I can get other scripts to work: $ ./check_nrpe -H app09 -c check_users USERS OK - 1 users currently logged in |users=1;5;10;0 $ ./check_nrpe -H app09 -c check_load OK - load average: 0.00, 0.05, 0.06|load1=0.003;15.000;30.000;0; load5=0.046;10.000;25.000;0; load15=0.061;5.000;20.000;0; FWIW, both of the above scripts are binaries: $ file check_load check_users check_raid_dell check_load: ELF 64-bit LSB executable, AMD x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped check_users: ELF 64-bit LSB executable, AMD x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped check_raid_dell: perl script text I have confirmed that the user that nrpe is running as can execute the command: # su -m -c nagios nagios -c cd /usr/local/libexec/nagios perl check_raid_dell RAID_DELL CRITICAL: RAID is critical. Ideas? Suggestions? Plans? -- Dan Langille : Software Developer looking for work my resume: http://www.freebsddiary.org/dan_langille.php PGCon - The PostgreSQL Conference - http://www.pgcon.org/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDE V ___ 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 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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] NRPE: Unable to read output
On 15 Jan 2007 at 18:08, Dan Langille wrote: Hi folks, I'm using nrpe 1.9 on FreeBSD 6.x and I'm failing to get a remote script to work. It seems that no perl script works, but I can get compiled plug-ins to work. The result is, which invoked on the nagios server is: $ ./check_nrpe -H app09 -c check_raid_dell NRPE: Unable to read output On the remote machine, app09, I get: $ perl check_raid_dell RAID_DELL CRITICAL: RAID is critical. $ I know that a value is being returned: $ echo $? 2 $ It's as if the remote script is inappropriate for use with nrpe. I can get other scripts to work: $ ./check_nrpe -H app09 -c check_users USERS OK - 1 users currently logged in |users=1;5;10;0 $ ./check_nrpe -H app09 -c check_load OK - load average: 0.00, 0.05, 0.06|load1=0.003;15.000;30.000;0; load5=0.046;10.000;25.000;0; load15=0.061;5.000;20.000;0; FWIW, both of the above scripts are binaries: $ file check_load check_users check_raid_dell check_load: ELF 64-bit LSB executable, AMD x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped check_users: ELF 64-bit LSB executable, AMD x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped check_raid_dell: perl script text I have confirmed that the user that nrpe is running as can execute the command: # su -m -c nagios nagios -c cd /usr/local/libexec/nagios perl check_raid_dell RAID_DELL CRITICAL: RAID is critical. Ideas? Suggestions? Plans? My thanks to bernardl for the repeated questions about what I was doing. The solution: write a wrapper which does a cd. # cat check_raid_dell_wrapper #!/bin/sh cd /usr/local/libexec/nagios perl check_raid_dell Then refer to the wrapper in the nrpe.cfg on the remote server: # grep dell /usr/local/etc/nrpe.cfg command[check_raid_dell]=/usr/local/libexec/nagios/check_raid_dell_wra pper NOTE the use of the wrapper path Restart nrpe on the remote box and then test it on the server: $ ./check_nrpe -H app09 -c check_raid_dell RAID_DELL CRITICAL: RAID is critical. \o/ cheers -- Dan Langille : Software Developer looking for work my resume: http://www.freebsddiary.org/dan_langille.php PGCon - The PostgreSQL Conference - http://www.pgcon.org/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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] NRPE: Unable to read output
Hi, On 1/16/2007 12:40 AM, Dan Langille wrote: On 15 Jan 2007 at 18:08, Dan Langille wrote: Hi folks, I'm using nrpe 1.9 on FreeBSD 6.x and I'm failing to get a remote script to work. It seems that no perl script works, but I can get compiled plug-ins to work. ... My thanks to bernardl for the repeated questions about what I was doing. The solution: write a wrapper which does a cd. # cat check_raid_dell_wrapper #!/bin/sh cd /usr/local/libexec/nagios perl check_raid_dell Then refer to the wrapper in the nrpe.cfg on the remote server: # grep dell /usr/local/etc/nrpe.cfg command[check_raid_dell]=/usr/local/libexec/nagios/check_raid_dell_wra pper Interesting. Should be possible to invoke the check script directly, though. You can call it with its path, it should have a hash bang line, and the necessary inclusion of utils.pm could be handled from inside the script. Which, incidentially, is how the standard plugins I know work :-) But a wrapper is often the solution to plugin problems... Arno NOTE the use of the wrapper path Restart nrpe on the remote box and then test it on the server: $ ./check_nrpe -H app09 -c check_raid_dell RAID_DELL CRITICAL: RAID is critical. \o/ cheers -- IT-Service Lehmann[EMAIL PROTECTED] Arno Lehmann http://www.its-lehmann.de - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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] NRPE: Unable to read output
On 16 Jan 2007 at 1:12, Arno Lehmann wrote: Hi, On 1/16/2007 12:40 AM, Dan Langille wrote: On 15 Jan 2007 at 18:08, Dan Langille wrote: Hi folks, I'm using nrpe 1.9 on FreeBSD 6.x and I'm failing to get a remote script to work. It seems that no perl script works, but I can get compiled plug-ins to work. ... My thanks to bernardl for the repeated questions about what I was doing. The solution: write a wrapper which does a cd. # cat check_raid_dell_wrapper #!/bin/sh cd /usr/local/libexec/nagios perl check_raid_dell Then refer to the wrapper in the nrpe.cfg on the remote server: # grep dell /usr/local/etc/nrpe.cfg command[check_raid_dell]=/usr/local/libexec/nagios/check_raid_dell_wra pper Interesting. Should be possible to invoke the check script directly, though. You can call it with its path, it should have a hash bang line, and the necessary inclusion of utils.pm could be handled from inside the script. Which, incidentially, is how the standard plugins I know work :-) But a wrapper is often the solution to plugin problems... We write that, with the full path. That is what led us to the wrapper solution: # su -m -c nagios nagios c /usr/local/libexec/nagios/check_raid_dell Can't locate utils.pm in @INC (@INC contains: nagios /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 .) at /usr/local/libexec/nagios/check_raid_dell line 17. BEGIN failed--compilation aborted at /usr/local/libexec/nagios/check_raid_dell line 17. # -- Dan Langille : Software Developer looking for work my resume: http://www.freebsddiary.org/dan_langille.php PGCon - The PostgreSQL Conference - http://www.pgcon.org/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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] NRPE: Unable to read output
Hi, On 1/16/2007 1:26 AM, Dan Langille wrote: On 16 Jan 2007 at 1:12, Arno Lehmann wrote: Hi, On 1/16/2007 12:40 AM, Dan Langille wrote: On 15 Jan 2007 at 18:08, Dan Langille wrote: Hi folks, I'm using nrpe 1.9 on FreeBSD 6.x and I'm failing to get a remote script to work. It seems that no perl script works, but I can get compiled plug-ins to work. ... My thanks to bernardl for the repeated questions about what I was doing. The solution: write a wrapper which does a cd. # cat check_raid_dell_wrapper #!/bin/sh cd /usr/local/libexec/nagios perl check_raid_dell Then refer to the wrapper in the nrpe.cfg on the remote server: # grep dell /usr/local/etc/nrpe.cfg command[check_raid_dell]=/usr/local/libexec/nagios/check_raid_dell_wra pper Interesting. Should be possible to invoke the check script directly, though. You can call it with its path, it should have a hash bang line, and the necessary inclusion of utils.pm could be handled from inside the script. Which, incidentially, is how the standard plugins I know work :-) But a wrapper is often the solution to plugin problems... We write that, with the full path. That is what led us to the wrapper solution: # su -m -c nagios nagios c /usr/local/libexec/nagios/check_raid_dell Can't locate utils.pm in @INC (@INC contains: nagios /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 .) at /usr/local/libexec/nagios/check_raid_dell line 17. BEGIN failed--compilation aborted at /usr/local/libexec/nagios/check_raid_dell line 17. # Well, I'm not a perl guru, but in the standard plugins I looked at I have a line use lib /usr/local/nagios2/libexec ; which looks like it is important for cases like yours... Arno -- IT-Service Lehmann[EMAIL PROTECTED] Arno Lehmann http://www.its-lehmann.de - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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] NRPE: Unable to read output
On 16 Jan 2007 at 2:06, Arno Lehmann wrote: Hi, On 1/16/2007 1:26 AM, Dan Langille wrote: On 16 Jan 2007 at 1:12, Arno Lehmann wrote: Hi, On 1/16/2007 12:40 AM, Dan Langille wrote: On 15 Jan 2007 at 18:08, Dan Langille wrote: Hi folks, I'm using nrpe 1.9 on FreeBSD 6.x and I'm failing to get a remote script to work. It seems that no perl script works, but I can get compiled plug-ins to work. ... My thanks to bernardl for the repeated questions about what I was doing. The solution: write a wrapper which does a cd. # cat check_raid_dell_wrapper #!/bin/sh cd /usr/local/libexec/nagios perl check_raid_dell Then refer to the wrapper in the nrpe.cfg on the remote server: # grep dell /usr/local/etc/nrpe.cfg command[check_raid_dell]=/usr/local/libexec/nagios/check_raid_dell_wra pper Interesting. Should be possible to invoke the check script directly, though. You can call it with its path, it should have a hash bang line, and the necessary inclusion of utils.pm could be handled from inside the script. Which, incidentially, is how the standard plugins I know work :-) But a wrapper is often the solution to plugin problems... We write that, with the full path. That is what led us to the wrapper solution: # su -m -c nagios nagios c /usr/local/libexec/nagios/check_raid_dell Can't locate utils.pm in @INC (@INC contains: nagios /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 .) at /usr/local/libexec/nagios/check_raid_dell line 17. BEGIN failed--compilation aborted at /usr/local/libexec/nagios/check_raid_dell line 17. # Well, I'm not a perl guru, but in the standard plugins I looked at I have a line use lib /usr/local/nagios2/libexec ; which looks like it is important for cases like yours... $ grep use lib check_* check_breeze:use lib nagios ; check_disk_smb:use lib nagios ; check_file_age:use lib nagios; check_flexlm:use lib nagios; check_ifoperstatus:use lib nagios ; check_ifstatus:use lib nagios ; check_ircd:use lib nagios; check_mailq:use lib nagios; check_rpc:use lib nagios; check_wave:use lib nagios; Yep... How unfortunate that the one I chose to base my plugin on is check_file_age, which does not have this. -- Dan Langille : Software Developer looking for work my resume: http://www.freebsddiary.org/dan_langille.php PGCon - The PostgreSQL Conference - http://www.pgcon.org/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ 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
[Nagios-users] ===NRPE: Unable to read output
Hi Folks, I am setting up Nagios with my first client. This is the output I get when I execute the command from the command line from the Nagios host is "NRPE: Unable to read output " It also shows up in the nagios.log. The command line exec is: ./check_nrpe -H 83556-dev.slc.com -c check_total_procs I have nrpe running on the client: nagios 25998 1 0 Apr10 ? 00:00:05 /usr/local/nagios/libexec/nrpe -c /usr/local/nagios/nrpe.cfg -d I am running xinetd and the service definitions on the client are in /usr/local/nagios/etc/nrpe.cfg: command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda3 command[check_disk2]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda2 command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 Why am I getting this error? Thanks, --Joe McCaughan Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Beta.Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ 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] ===NRPE: Unable to read output
I see this when I forget to do a kill -1 nrpe PID to reload the configuration file. Steve From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe McCaughan Sent: Thursday, June 29, 2006 4:19 PM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] ===NRPE: Unable to read output Hi Folks, I am setting up Nagios with my first client. This is the output I get when I execute the command from the command line from the Nagios host is NRPE: Unable to read output It also shows up in the nagios.log. The command line exec is: ./check_nrpe -H 83556-dev.slc.com -c check_total_procs I have nrpe running on the client: nagios 25998 1 0 Apr10 ? 00:00:05 /usr/local/nagios/libexec/nrpe -c /usr/local/nagios/nrpe.cfg -d I am running xinetd and the service definitions on the client are in /usr/local/nagios/etc/nrpe.cfg: command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda3 command[check_disk2]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda2 command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 Why am I getting this error? Thanks, --Joe McCaughan Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Beta. Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ 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] ===NRPE: Unable to read output
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe McCaughan Sent: Thursday, June 29, 2006 3:19 PM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] ===NRPE: Unable to read output Hi Folks, I am setting up Nagios with my first client. This is the output I get when I execute the command from the command line from the Nagios host is NRPE: Unable to read output It also shows up in the nagios.log. The command line exec is: ./check_nrpe -H 83556-dev.slc.com -c check_total_procs I have nrpe running on the client: nagios 25998 1 0 Apr10 ?00:00:05 /usr/local/nagios/libexec/nrpe -c /usr/local/nagios/nrpe.cfg -d I am running xinetd and the service definitions on the client are in /usr/local/nagios/etc/nrpe.cfg: command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda3 command[check_disk2]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda2 command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 Why am I getting this error? Thanks, --Joe McCaughan Joe, This might be a dumb question, but does the directory /usr/local/nagios/libexec/ exist on the client (83556-dev.slc.com)? Can you run /usr/local/nagios/libexec/check_procs -w 150 -c 200 as the NAGIOS user and see a return? What version nrpe check_nrpe? Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ 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
[Nagios-users] NRPE: Unable to read output Problems
Hi all, I installed a new script in a remote server but on trying to invoke it from my Nagios host with the command : ./check_nrpesun -H 192.168.5.10 -p 5666 -t 5 -c check_wlheap I get a NRPE: Unable to read output message. Now, before anybody suggests that I check the file and directory permissions, I have already done that and confirmed and reconfirmed that the script has the proper permissions. :) I have a number of scripts running on this remote server and all of them run fine except for this one. All have the same permissions and are configured Ok in the nrpe.cfg. Is there anything else I should check for ? TIA, sg --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642 ___ 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
[Nagios-users] NRPE: Unable to read output returns ok?
[ Fedora Core 4 ] [ Nagios 2.0 ] [ NRPE 2.4 ] Hello list I am getting some wrong information when checking some of my switches, as you can see here (from the web interface): SW-14 ALIVECRITICAL30-03-2006 11:16:52 0d 0h 22m 10s 3/3 CRITICAL - Host Unreachable (y.y.y.y) SW-14 PORT 24OK 30-03-2006 11:17:03 0d 19h 43m 48s 1/3 NRPE: Unable to read output My question is: is it correct that NRPE returns OK when unable to read the output? In my opinion, it should return a critical alert or at least an unknown state. That's not the only example; in some cases I get OK for NRPE: Unable to read output even when the switch is up. That's my configuration for the involved services/hosts/checks/nrpe. Understand that I can't check the host directly as that switch is behind a firewall - so that I use the nrpe_master host to query them. define host { use default_host check_command check_tcp!5666 host_name nrpe_master alias NRPE MASTER address x.x.x.x } define service { use default_service host_name nrpe_master service_description SW-14 ALIVE check_command check_nrpe!check-host-alive!y.y.y.y } define service { use default_service host_name nrpe_master service_description SW-14 PORT 24 check_command check_nrpe!check_snmp_int!y.y.y.y!161!public!'Port 24 on Unit 1' } define command { command_namecheck_nrpe command_line$USER1$/check_nrpe -t 30 -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$ $ARG8$ $ARG9$ $ARG10$ $ARG11$ } # NRPE commands command[check-host-alive]=/usr/local/nagios/libexec/check_ping -H $ARG1$ -w 3000.0,80% -c 5000.0,100% -p 1 -t 30 command[check_snmp_int]=/usr/local/nagios/libexec/check_snmp_int.pl -t 30 -H $ARG1$ -p $ARG2$ -C $ARG3$ -n '$ARG4$' -- Rafael Costa [EMAIL PROTECTED] Curitiba - Paraná - Brasil --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ 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
[Nagios-users] NRPE: Unable to read output
Hi,I am getting this message when i try to run a perl script on a nagios server requesting via check_nrpe for remote server running with nrpe.The script is on the remote server.Please help me it is immediate.Thanks, Satish Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze.
Re: [Nagios-users] NRPE: Unable to read output
On Thu, 2006-03-16 at 04:45 -0800, satish kumar wrote: Hi, I am getting this message when i try to run a perl script on a nagios server requesting via check_nrpe for remote server running with nrpe.The script is on the remote server.Please help me it is immediate. is it any particular script? The first thing I would do is add 21 to the end of your command definition in nrpe.cfg. This will echo back stderr, which will tell you what's wrong (with Perl, almost certainly a missing library). signature.asc Description: This is a digitally signed message part
[Nagios-users] NRPE: Unable to read output
I'm running NRPE 2.3 and Nagios 2.0rc2. I read a lot of post in many forum and also a lot of messages in many many mailing list and newsgroup. I tried with all the solution concerning files permission. The output of my syslog is: Feb 9 13:14:59 LinuxSAM nrpe[12623]: Connection from 10.28.3.63 port 63362 Feb 9 13:14:59 LinuxSAM nrpe[12623]: Handling the connection... Feb 9 13:14:59 LinuxSAM nrpe[12623]: Host is asking for command 'check_users' to be run... Feb 9 13:14:59 LinuxSAM nrpe[12623]: Running command: /usr/local/nagios/libexec/check_users -w 5 -c 10 Feb 9 13:14:59 LinuxSAM nrpe[12623]: Command completed with return code 3 and output: Feb 9 13:14:59 LinuxSAM nrpe[12623]: Return Code: 3, Output: NRPE: Unable to read output Feb 9 13:14:59 LinuxSAM nrpe[12623]: Connection from XÂÿ¿Àu_· closed. Any ideas? --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642 ___ 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