I've been looking at this some more today, and finally found the problem
and solution!
I added /dev/stdout 21 to the end of a command in my nrpe.cfg, and
got the following result when running check_nrpe off my Nagios server:
sudo: sorry, you must have a tty to run sudo.
Looking at the /etc/sudoers file on the machine reveals a line Defaults
requiretty. Commenting this out sorted the problem.
For some reason, on a stock FC4 install, the sudoers file was virtually
empty, yet in FC6 it was full of various settings!
Andy.
[EMAIL PROTECTED] wrote:
I've been head-scratching most of the afternoon over this.
I've installed NRPE 2.7.1 on a Fedora Core 6 machine, and no matter what I
try, it doesn't like the command_prefix setting.
Here is my config:
...
### Daemon Options
pid_file=/var/run/nrpe.pid
server_port=5666
#server_address=192.168.1.1
nrpe_user=nagios
nrpe_group=localservice
#allowed_hosts=127.0.0.1,82.165.38.62
dont_blame_nrpe=0
#command_prefix=/usr/bin/sudo
debug=1
command_timeout=60
connection_timeout=300
#allow_weak_random_seed=1
### Commands configuration
...
with all the commands listed afterwards (check_dns, check_procs etc.)
Notice how command_prefix is commented out. This works:
# ./check_nrpe -H 127.0.0.1 -c check_dns
DNS OK: 0.062 seconds response time. portland-1.andyshellam.eu returns
89.200.137.203|time=0.062236s;;;0.00
If I uncomment command_prefix and kill/restart NRPE:
# ./check_nrpe -H 127.0.0.1 -c check_dns
NRPE: Unable to read output
If I login as the Nagios user (nagios) which is whom NRPE runs under, and
try the command I believe NRPE is trying to run:
$ /usr/bin/sudo /usr/local/nagios/libexec/check_dns -H
portland-1.andyshellam.eu -a 89.200.137.203
DNS OK: 0.005 seconds response time. portland-1.andyshellam.eu returns
89.200.137.203|time=0.004811s;;;0.00
Any ideas, anyone?
I've tried with and without SSL - makes no difference, enabled debugging but
don't get anything helpful in syslog. I have some plugins that need root
privelege so need this working.
Thanks,
Andy.
_
DISCLAIMER
This e-mail was sent through a Mail Network server.
The Mail Network accepts no liability for it's content.
-
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,4602a9c8103001188359059!
-
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