< back

APT Plugin for CHECK_MK

Monitoring Debian security updates with Check_MK.

We are using Check_MK for monitoring at work. It features a quite nice replacement for NRPE agents and automatic Nagios configuration generation.

I wrote an APT Plugin which will refresh the package cache on every agent, every 60 minutes and check for new Debian upgrades or security updates. Depending on the severity it will return different Nagios status codes:

  • OK - No upgrades are available.
  • WARNING - Only non-security upgrades are available.
  • CRITICAL - Security upgrades are available (might also involve normal upgrades).

its hosted at GitHub.

Agent installation

Install the python-apt package and copy plugins/apt to your servers. You would properly want to add this to puppet.

  aptitude install python-apt
  git clone git://github.com/sts/checkmk-apt.git
  checkmk-apt/plugins/apt /usr/lib/check_mk_agent/plugins/apt
  chmod a+x /usr/lib/check_mk_agent/plugins/apt

Installing on your Nagios Server

Copy checks/apt to your checks directory and run a Check_MK inventarize and config update.

  git clone git://github.com/sts/checkmk-apt.git
  cp  checkmk-apt/checks/apt /usr/local/share/check_mk/scripts/
  chmod a+x /usr/local/share/check_mk/scripts/apt

  # Check_MK Inventory+Generate Nagios Configuration
  check_mk -I alltcp
  check_mk -U
  invoke-rc.d nagios3 restart