Skip to content

A nagios plugin to warn if it is too long since yum update was last run.

Notifications You must be signed in to change notification settings

aptivate/check_yum_last_update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

check_yum_last_update

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

NRPE set up

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

How it works

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.

About

A nagios plugin to warn if it is too long since yum update was last run.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages