Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
Add check to ensure the chef-client daemon is running
Browse files Browse the repository at this point in the history
Sam Kottler committed Jun 20, 2014
1 parent bdd6fea commit 563eaef
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Original file line number Diff line number Diff line change
@@ -221,7 +221,7 @@ GRAPH
rubygems-repo (0.0.6)
aptly (>= 0.0.0)
rubygems (>= 0.0.0)
rubygems-sensu (0.0.46)
rubygems-sensu (0.0.47)
chef-vault (>= 0.0.0)
sensu (>= 0.0.0)
rubygems-ssh (0.0.3)
2 changes: 1 addition & 1 deletion cookbooks/rubygems-sensu/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name 'rubygems-sensu'
maintainer 'RubyGems.org ops team'

version '0.0.46'
version '0.0.47'

depends 'chef-vault'
depends 'sensu'
8 changes: 8 additions & 0 deletions cookbooks/rubygems-sensu/recipes/base.rb
Original file line number Diff line number Diff line change
@@ -28,6 +28,14 @@
additional(notification: 'There is a high number of procs running', occurences: 3)
end

sensu_check 'check_chef_client_proc' do
command "ruby check-procs.rb -p '/usr/bin/chef-client -d -P /var/run/chef/client.pid'"
handlers ['slack']
subscribers ['all']
interval 30
additional(notification: 'chef-client is not running', occurences: 3)
end

sensu_check 'check_ssh' do
command '/usr/lib/nagios/plugins/check_ssh localhost'
handlers ['slack']

0 comments on commit 563eaef

Please sign in to comment.