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

Commit

Permalink
more sensu checks
Browse files Browse the repository at this point in the history
dwradcliffe committed Jul 19, 2014

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent b35a03a commit 192650a
Showing 6 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Original file line number Diff line number Diff line change
@@ -277,7 +277,7 @@ GRAPH
nginx (>= 0.0.0)
rubygems (>= 0.0.0)
rubygems-ruby (0.0.1)
rubygems-sensu (0.0.64)
rubygems-sensu (0.0.67)
chef-vault (>= 0.0.0)
sensu (>= 0.0.0)
rubygems-ssh (0.0.4)
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.64'
version '0.0.67'

depends 'chef-vault'
depends 'sensu'
12 changes: 12 additions & 0 deletions cookbooks/rubygems-sensu/recipes/app.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Cookbook Name:: rubygems-sensu
# Recipe:: app
#

sensu_check 'check_app_nginx_http' do
command '/usr/lib/nagios/plugins/check_http -I 127.0.0.1 -p 9000'
handlers ['slack']
subscribers ['app']
interval 30
additional(notification: 'nginx is not returning 200 OK on port 9000', occurences: 3)
end
8 changes: 0 additions & 8 deletions cookbooks/rubygems-sensu/recipes/balancer.rb
Original file line number Diff line number Diff line change
@@ -3,14 +3,6 @@
# Recipe:: balancer
#

sensu_check 'check_nginx_proc' do
command "/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb -p 'nginx: master process /usr/sbin/nginx'"
handlers ['slack']
subscribers ['balancer']
interval 30
additional(notification: 'nginx is not running', occurences: 3)
end

sensu_check 'check_nginx_http' do
command '/usr/lib/nagios/plugins/check_http -I 127.0.0.1'
handlers ['slack']
2 changes: 2 additions & 0 deletions cookbooks/rubygems-sensu/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -30,4 +30,6 @@

include_recipe 'rubygems-sensu::base'
include_recipe 'rubygems-sensu::balancer'
include_recipe 'rubygems-sensu::app'
include_recipe 'rubygems-sensu::nginx'
include_recipe 'sensu::client_service'
12 changes: 12 additions & 0 deletions cookbooks/rubygems-sensu/recipes/nginx.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Cookbook Name:: rubygems-sensu
# Recipe:: nginx
#

sensu_check 'check_nginx_proc' do
command "/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb -p 'nginx: master process /usr/sbin/nginx'"
handlers ['slack']
subscribers ['balancer', 'app']
interval 30
additional(notification: 'nginx is not running', occurences: 3)
end

0 comments on commit 192650a

Please sign in to comment.