APT Plugin for Check MK

Project Source

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:

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
read more