check_zypper

check_zypper

  • You are running a zypp based based system like openSUSEor SUSE Linux Enterprise Server > 10 SP1
  • You like to know which host in your serverfarm lacks security updates?
  • You like to know if there are package updates available from download.opensuse.orgresp. the openSUSE Build Service?
  • You like to know how many "unsupported" packages are installed on your host that might never see any update?
  • You like to know when your prefered Distribution is out of maintenance?
  • You already use Nagios to monitor your hosts?

Then you want to use this Nagios Plugin: "check_zypper". This plugin checks for security, recommended and optional patches and also for optional package updates. You can define the reporting level and verbosity of the output. Ignoring single patches or packages is also possible.

Please use the Software Portal to find an installable package for your distribution. The plugin is developed in the server:monitoring project in the openSUSE Build Service.

Synopsis:


./check_zypper [-w ] [-c ] [-t ] [-v]
./check_zypper [-h | --help]
./check_zypper [-V | --version]

Options:

Flag Description
-c, --critical A patch with this category result in critical status.
Default: security
-f, --releasefile Use the given file to get informations about the distribution.
Default: /etc/SuSE-release
-h, --help Print detailed help screen
-i, --ignore Ignore patches/packages that are mentioned in < file >.
Just list one patch/package per line - example:

patch:libtiff-devel
# comment
package:libtiff3
package:libtiff-devel
-o, --ignore_outdated Don't warn if a repository is outdated.
-p, --no_perfdata Print no perfdata
-r, --refresh_repos Tries to refresh the repositories before checking for updates.
Note: this maybe needs an entry in /etc/sudoers like:
nagios ALL = NOPASSWD: /usr/bin/zypper ref
(and additional lines for the \'-s\' Option) if no check-zypp-wrapper is available.
-s, --use_sudo Zypper needs root privileges on some distributions (known: 10.1 and SLE10).
You can enable the script to use $sudo to start zypper.
But don't forget to enable nopasswd sudo for the user starting check_zypper.
Via lines like the two below on in /etc/sudoers:
nagios ALL = NOPASSWD: /usr/bin/zypper sl, \
/usr/bin/zypper --non-interactive --no-gpg-checks xml-updates
-t, --timeout Just in case of problems, let's not hang Nagios and define a timeout.
Default value is: 120 seconds
-v, --verbose_output Print more information
-w, --warning A patch with this category result in warning status.
Default: recommended,optional
-V, --version Print version information
-d, --debug Print debug output to STDERR