problem with check_yum
Seth Simmons
ssimmons at cymfony.com
Thu Apr 16 01:14:55 CEST 2009
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.
-----Original Message-----
From: Seth Simmons
Sent: Wednesday, April 15, 2009 12:43 PM
To: Hari Sekhon
Cc: Nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] problem with check_yum
I refreshed the checks for my CentOS systems and now it shows how many updates are there, which is nice.
However, there is still an issue with my RH 5 system. If I use this check_yum plugin, it tells me in Nagios "UNKNOWN: Security plugin for yum is required." I did install this on all my CentOS/RH 5 boxes, but this one thinks it isn't there.
If I run the plugin locally, it works saying there are updates available.
Very strange...
-----Original Message-----
From: Seth Simmons
Sent: Wednesday, April 15, 2009 12:10 PM
To: Hari Sekhon
Cc: Nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] problem with check_yum
Thanks
This version is more verbose and has more options available; I'll see how this works.
-----Original Message-----
From: Hari Sekhon [mailto:hpsekhon at googlemail.com]
Sent: Wednesday, April 15, 2009 9:56 AM
To: Seth Simmons
Cc: Nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] problem with check_yum
Seth Simmons wrote:
>
> I’m running nagios 3.0.6 and using check_yum on my red hat/centos boxes.
>
> Today I’ve had all my centos boxes show yum warnings about needed
> updates; found out centos 5.3 was released.
>
> I have one red hat 5.2 box. The problem is, check_yum within nagios
> shows ‘o/s is up to date’ as of last check (10 min ago).
>
> If I run it manually from the machine, it gives a warning that updates
> are needed (verified through yum and rhn).
>
> How can nagios be reporting that yum is ok when it isn’t?
>
Fyi, see
http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F2577.html;d=1
for a better check_yum plugin. I wrote it, the one you are using really
was too primitive I thought...
I've not seen this behaviour with this plugin, but it gives better
visibility on how many updates, whether they are security or just
regular non-critical updates etc...
There is also a note about update check reliability when running as a
non root user.
-h
--
Hari Sekhon
Always open to interesting opportunities
http://www.linkedin.com/in/harisekhon
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Nagios-users mailing list
Nagios-users at 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:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Nagios-users mailing list
Nagios-users at 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
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Nagios-users mailing list
Nagios-users at 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
More information about the Users
mailing list