No commit activity in last 3 years
No release in over 3 years
The Chef client handler for nagios
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Nagios Chef-Client Handler

This Chef-client handler is available as Ruby Gem on Rubygems.org. the handler generates and updates a file on the local file system of a host that contains information about the latest chef-client run. The accompanying Nagios check the age of the file and reads its content. based o this information it reports back to Nagios.

The Gem is tested on Linux (RHEL6 & Binary compatibles) & MS-Windows 2008R2 but its likely it will run without issues on other OSses

For automatic deployment and configuration this Handler depends on the chef-client cookbook

installation and configuration

Add the following to your role/environment to install and configure the handler:

"chef_client": {
  "load_gems": {
     "sbp_nagios_chefclient_handler": {
       "require_name": "sbp_nagios_chefclient_handler/sbp_nagios_chefclient_handler"
     }
  },
  "config": {
    "report_handlers": [
       {"class": "SBP::Nagios::Chefclient::Handler", "arguments": []}
    ],
    "exception_handlers": [
       {"class": "SBP::Nagios::Chefclient::Handler", "arguments": []}
    ]
  }
},

The load_gems attribute will install the gem, the config part will tell chef-client to actually use the reporthandler for bot, normal and failed execution.

Also: add the chef-client::config recipe to your runlist.

The results file will be created as /var/chef/lastrun_results on Linur or c:\var\chef\lastrun_results on Windows. You can influence the path where the lastrun_results file will be created by provisioning the following attribute:

"chef_client": {
    "resultspath": "/your/custom/path/"
  }
}