<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks for the reply, I just tried that but unfortunately it still gave
the same result.<br>
<br>
I have another sudo /etc/nagios/plugin and that works. Also, su-ing to
nagios and then running the command by hand works.<br>
<br>
so I'm still stuck....<br>
<br>
<pre class="moz-signature" cols="72">Hari Sekhon
</pre>
<br>
<br>
Andy Shellam (Mailing Lists) wrote:
<blockquote cite="mid45DC5FA5.1000201@mailnetwork.co.uk" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
I had this problem, and had to put the full path to sudo
(/usr/bin/sudo) in nrpe's config.<br>
<br>
HTH<br>
<br>
Andy.<br>
<br>
Hari Sekhon wrote:
<blockquote cite="mid45DC4DCD.1040101@googlemail.com" type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">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: <a class="moz-txt-link-abbreviated"
href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net</a>
[<a class="moz-txt-link-freetext"
href="mailto:nagios-users-bounces@lists.sourceforge.net">mailto:nagios-users-bounces@lists.sourceforge.net</a>] 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 2>&1 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
</pre>
</blockquote>
<pre wrap=""><!---->
-------------------------------------------------------------------------
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
<a class="moz-txt-link-freetext"
href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV">http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</a>
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated"
href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext"
href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: 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!
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
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</pre>
<pre wrap="">
<hr size="4" width="90%">
-------------------------------------------------------------------------
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
<a class="moz-txt-link-freetext" href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV">http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</a></pre>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null</pre>
</blockquote>
</body>
</html>