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

Commit

Permalink
more monitoring updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dwradcliffe committed Jul 22, 2014
1 parent e8f69cf commit a6751da
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 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.67)
rubygems-sensu (0.0.68)
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.67'
version '0.0.68'

depends 'chef-vault'
depends 'sensu'
Expand Down
18 changes: 17 additions & 1 deletion cookbooks/rubygems-sensu/recipes/app.rb
Expand Up @@ -4,9 +4,25 @@
#

sensu_check 'check_app_nginx_http' do
command '/usr/lib/nagios/plugins/check_http -I 127.0.0.1 -p 9000'
command '/usr/lib/nagios/plugins/check_http -I 127.0.0.1 -p 9000 -t 5 -w 1 -c 2'
handlers ['slack']
subscribers ['app']
interval 30
additional(notification: 'nginx is not returning 200 OK on port 9000', occurences: 3)
end

sensu_check 'check_unicorn_http' do
command '/usr/lib/nagios/plugins/check_http -I 127.0.0.1 -p 3000 -t 5 -w 1 -c 2'
handlers ['slack']
subscribers ['app']
interval 30
additional(notification: 'unicorn is not returning 200 OK on port 3000', occurences: 3)
end

sensu_check 'check_unicorn_proc' do
command "/opt/sensu/embedded/bin/ruby /etc/sensu/plugins/check-procs.rb -p 'unicorn master'"
handlers ['slack']
subscribers ['app']
interval 30
additional(notification: 'unicorn is not running', occurences: 3)
end
4 changes: 2 additions & 2 deletions cookbooks/rubygems-sensu/recipes/balancer.rb
Expand Up @@ -4,15 +4,15 @@
#

sensu_check 'check_nginx_http' do
command '/usr/lib/nagios/plugins/check_http -I 127.0.0.1'
command '/usr/lib/nagios/plugins/check_http -I 127.0.0.1 -t 5 -w 1 -c 2'
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'
command '/usr/lib/nagios/plugins/check_http -I 127.0.0.1 --ssl -t 5 -w 1 -c 2'
handlers ['slack']
subscribers ['balancer']
interval 30
Expand Down

0 comments on commit a6751da

Please sign in to comment.