|
From: Seth S. <ssi...@cy...> - 2009-04-16 04:18:57
|
Thanks, that did it. Wasn't sure if it was OS or nrpe; i also had issues before when trying to do check_mail with sudo but now it's obvious what the issue is. -----Original Message----- From: Matthias Flacke [mailto:Mat...@gm...] Sent: Wednesday, April 15, 2009 11:19 PM To: Seth Simmons Cc: nagios Mailinglist Subject: Re: [Nagios-users] problem with check_yum Seth Simmons wrote: > I think I found the problem. When I ran check_yum locally I forgot it was running as root which explains why it worked. Running locally as nagios caused the error. Apparently it isn't the plugin. If, as nagios, I run yum check-update it tells me I need to be root to access RHN repositories. Seems CentOS doesn't have that requirement with yum, which explains why it works on all of those systems. > > Running check_yum as nagios locally with sudo (nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_yum) for that one binary works. > > Problem now is, using the plugin with sudo through nrpe. When I try to run through nrpe it returns "unable to read output". > > This is the command: > command[check_yum_rhn]=/usr/bin/sudo /usr/local/nagios/libexec/check_yum > > been looking around and some have had the same problem; often fixed by adding the complete path to sudo, but it isn't working here. It seems that your /etc/sudoers contains a line 'Defaults requiretty' If you comment it, also connections without a real tty are allowed to run sudo commands. -Matthias |