This is a nagios plugin to check how long it has been since yum update was last run. It should be installed on each server you want to check and accessed via NRPE.
Usage: check_yum_last_update [options]
Options:
-h, --help show this help message and exit
-w WARNING, --warning=WARNING
Issue WARNING if the last update was more than this
many days ago.
-c CRITICAL, --critical=CRITICAL
Issue CRITICAL if the last update was more than this
many days ago.
-x EXCLUDE, --exclude=EXCLUDE
List of packages to ignore updates of when checking
for last update. (For when you have a small number of
packages auto-update.)
-t TIMEOUT, --timeout=TIMEOUT
Sets a timeout in seconds after which the plugin will
exit (defaults to 30 seconds).
-v, --verbose Verbose mode. Can be used multiple times to increase
output. Use -vvv for debugging output. By default only
one result line is printed as per Nagios standards
-V, --version Print version number and exit
To configure it for NRPE you need a line like the below in your nrpe.cfg
command[check_yum_last_update]=/usr/bin/sudo /usr/local/lib/nagios/plugins/check_yum_last_update -w 45 -c 75
It looks for the last line with "Updated:" in /var/log/yum.log (and it will also check /var/log/yum.log.1 etc.) It then parses the date at the start of the line and works out how long ago the update was.