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!
O/S requires an update, while all is up to date
-
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
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
If you run the following
Code: Select all
yum clean all
su nagios -c 'yum clean all'Re: O/S requires an update, while all is up to date
Hi.
I tried this, but it states it needs to run as root
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
Lets run it as root, just
Then run the command as both users to see if they match
Code: Select all
yum clean all 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)'Re: O/S requires an update, while all is up to date
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!
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!