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
  • Loading branch information
dwradcliffe committed Jul 19, 2014
1 parent b35a03a commit 192650a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/rubygems-sensu/metadata.rb
@@ -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'
Expand Down
12 changes: 12 additions & 0 deletions cookbooks/rubygems-sensu/recipes/app.rb
@@ -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
Expand Up @@ -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']
Expand Down
2 changes: 2 additions & 0 deletions cookbooks/rubygems-sensu/recipes/default.rb
Expand Up @@ -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
@@ -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.