yum update alert incorrect
yum update alert incorrect
I have a handfull of centos systems that I run the 'check_yum' check on. the centos install range from 6.5 to 7. something.
but the issue is, Nagios is reporting "YUM WARNING: O/S requires an update. " on several machines (os version doesn't seem to matter)
I ssh into the machines, run yum update and it comes back with saying "no packages marked for update"
any ideas on what is going on??
but the issue is, Nagios is reporting "YUM WARNING: O/S requires an update. " on several machines (os version doesn't seem to matter)
I ssh into the machines, run yum update and it comes back with saying "no packages marked for update"
any ideas on what is going on??
Everybody is somebody else’s weirdo
Re: yum update alert incorrect
Which check_yum script are you using? If it's the one deployed with XI, then here's the logic behind it. (not much)
It looks like it's just using yum check-update to determine what the answer is. Does that command come back clean as well?
Code: Select all
$yum = system("yum check-update >/dev/null");
if ($yum != 0)
{
print "YUM WARNING: O/S requires an update.\n";
exit $exit_codes{'WARNING'};
}
Former Nagios Employee
Re: yum update alert incorrect
just using the generic check from XI
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 700 -c $ARG1$ $ARG2$
$ARG1$ check_yum
# $yum = system("yum check-update >/dev/null");
-bash: syntax error near unexpected token `('
Everybody is somebody else’s weirdo
Re: yum update alert incorrect
The command you'll want to run is yum check-update - the rest of that part is from the actual plugin.
Former Nagios Employee
Re: yum update alert incorrect
]# yum check-update
Loaded plugins: fastestmirror, langpacks, rhnplugin
This system is receiving updates from RHN Classic or Red Hat Satellite.
Loading mirror speeds from cached hostfile
Everybody is somebody else’s weirdo
Re: yum update alert incorrect
Was there anything else outputted?
For example on mine it comes back with packages -
For example on mine it comes back with packages -
Code: Select all
[root@localhost libexec]# yum check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.steadfast.net
* extras: bay.uchicago.edu
* updates: centos.mirrors.wvstateu.edu
audit.x86_64 2.4.5-3.el6 base
audit-libs.x86_64 2.4.5-3.el6 base
avahi-libs.x86_64 0.6.25-15.el6_8.1 updates
b43-openfwwf.noarch 5.2-10.el6 base
bash.x86_64 4.1.2-40.el6 base
bfa-firmware.noarch 3.2.23.0-2.el6 base
binutils.x86_64 2.20.51.0.2-5.44.el6 base
ca-certificates.noarch 2015.2.6-65.0.1.el6_7 base
chkconfig.x86_64 1.3.49.5-1.el6 base
Former Nagios Employee
Re: yum update alert incorrect
[root@alfresco ~]# yum check-update
Loaded plugins: fastestmirror, langpacks, rhnplugin
This system is receiving updates from RHN Classic or Red Hat Satellite.
Loading mirror speeds from cached hostfile
[root@alfresco ~]#
Everybody is somebody else’s weirdo
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: yum update alert incorrect
Your post said CentOS boxes, but your output says RHEL. This error actually makes more sense as a RHEL issue. See this:
https://sourceforge.net/p/nagios/mailma ... /22112176/
Does the fix from there apply to you?:
https://sourceforge.net/p/nagios/mailma ... /22112176/
Does the fix from there apply to you?:
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.
Previous Nagios employee
Re: yum update alert incorrect
the "Default requiretty" is there and is NOT commented out.
but I don't understand why that would make Nagios say there are updates for it, yet the system itself doesn't think so
but I don't understand why that would make Nagios say there are updates for it, yet the system itself doesn't think so
Everybody is somebody else’s weirdo
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: yum update alert incorrect
If yum repo's need to be updated, root access is required on RHEL. The plugin runs as user nagios.I don't understand why that would make Nagios say there are updates for it
Most likely you were running as root.yet the system itself doesn't think so
Previous Nagios employee