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

Commit

Permalink
sensu checks for balancer
Browse files Browse the repository at this point in the history
  • Loading branch information
dwradcliffe committed Jul 17, 2014
1 parent 106ee02 commit fafce4c
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Berksfile.lock
Expand Up @@ -207,7 +207,7 @@ GRAPH
rubygems-backups (0.0.14)
chef-vault (>= 0.0.0)
rubygems-ruby (>= 0.0.0)
rubygems-balancer (0.0.22)
rubygems-balancer (0.0.24)
chef-vault (>= 0.0.0)
nginx (>= 0.0.0)
rubygems (>= 0.0.0)
Expand Down Expand Up @@ -277,7 +277,7 @@ GRAPH
nginx (>= 0.0.0)
rubygems (>= 0.0.0)
rubygems-ruby (0.0.1)
rubygems-sensu (0.0.61)
rubygems-sensu (0.0.64)
chef-vault (>= 0.0.0)
sensu (>= 0.0.0)
rubygems-ssh (0.0.4)
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/rubygems-balancer/metadata.rb
@@ -1,6 +1,6 @@
name 'rubygems-balancer'

version '0.0.22'
version '0.0.24'

depends 'chef-vault'
depends 'nginx'
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.61'
version '0.0.64'

depends 'chef-vault'
depends 'sensu'
Expand Down
36 changes: 36 additions & 0 deletions cookbooks/rubygems-sensu/recipes/balancer.rb
@@ -0,0 +1,36 @@
#
# Cookbook Name:: rubygems-sensu
# 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']
subscribers ['balancer']
interval 30
additional(notification: 'nginx is not returning 200 OK on port 80', occurences: 3)
end

sensu_check 'check_nginx_https' do
command "/usr/lib/nagios/plugins/check_http -I 127.0.0.1 --ssl"
handlers ['slack']
subscribers ['balancer']
interval 30
additional(notification: 'nginx is not returning 200 OK on port 443', occurences: 3)
end

sensu_check 'check_nginx_cert_expiration' do
command "/usr/lib/nagios/plugins/check_http -I 127.0.0.1 --ssl -C 30,14"
handlers ['slack']
subscribers ['balancer']
interval 30
additional(occurences: 3)
end
1 change: 1 addition & 0 deletions cookbooks/rubygems-sensu/recipes/default.rb
Expand Up @@ -29,4 +29,5 @@
end

include_recipe 'rubygems-sensu::base'
include_recipe 'rubygems-sensu::balancer'
include_recipe 'sensu::client_service'

0 comments on commit fafce4c

Please sign in to comment.