O/S requires an update, while all is up to date

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mitch2k
Posts: 5
Joined: Wed Nov 28, 2012 9:38 am

O/S requires an update, while all is up to date

Post by mitch2k »

Hi,

I have added some remote linux servers (CentOS) using the wizard. At first, everything worked fine (14 days now), but today I received a mail telling me that one of servers had a warning: YUM WARNING: O/S requires an update.
Since I was convinced that it was just a package that needed to be updated, I ran the yum update command on the server. To my surprise, no updates where found. So Nagios XI tells that there are updates, but that's not true.

I digged some deeper,and used the sintax that check_yum uses to check for updates (yum check-update | grep -e i386 -e noarch -e x86_64 | grep -i -v excluding | wc -l). This gives 0 as result, indicating that there are no updates.
Anyone an idea why Nagios then throws a warning? Any way to troubleshoot this?

Thanks!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: O/S requires an update, while all is up to date

Post by scottwilkerson »

When the check runs it runs as the nagios user and we have seen that this check can have the results you mentioned as it is running as a different user. This is associated with caching.

If you run the following

Code: Select all

yum clean all 
su nagios -c 'yum clean all'
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mitch2k
Posts: 5
Joined: Wed Nov 28, 2012 9:38 am

Re: O/S requires an update, while all is up to date

Post by mitch2k »

Hi.

I tried this, but it states it needs to run as root

Code: Select all

root@zeus [~]# su nagios -c 'yum clean all'
Loaded plugins: fastestmirror
You need to be root to perform this command.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: O/S requires an update, while all is up to date

Post by scottwilkerson »

Lets run it as root, just

Code: Select all

yum clean all 
Then run the command as both users to see if they match

Code: Select all

(yum check-update | grep -e i386 -e noarch -e x86_64 | grep -i -v excluding | wc -l)
su nagios -c '(yum check-update | grep -e i386 -e noarch -e x86_64 | grep -i -v excluding | wc -l)'
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mitch2k
Posts: 5
Joined: Wed Nov 28, 2012 9:38 am

Re: O/S requires an update, while all is up to date

Post by mitch2k »

Hi,

I have ran yum clean all as root yesterday, but Nagios was still telling me that there where updates.
This night, suddenly the state of the check changed to OK, so I guess it's resolved now.

Thanks scottwilkerson!
Locked