Such and such service is probably having X, that means Y.
No users will be able to do anything.
namespace :assets do | |
task :generate, :except => { :no_release => true }, :roles => :app do | |
desc "Asset copy" | |
run "mkdir #{release_path}/public/oldassets" | |
run "mkdir #{release_path}/public/oldassets/stylesheets" | |
run "mkdir #{release_path}/public/oldassets/javascripts" | |
run "cp -r #{deploy_to}/current/public/stylesheets/* #{release_path}/public/oldassets/stylesheets/" | |
run "cp -r #{deploy_to}/current/public/javascripts/* #{release_path}/public/oldassets/javascripts/" | |
end | |
end |
location ~ ^/(images|assets|javascripts|stylesheets|fonts)/ { | |
try_files /$uri /oldassets/$uri =404; | |
expires 10y; | |
} |
command[check_unicorn]=/usr/lib/nagios/plugins/check_procs -c 1:24 -C unicorn |
command[check_raindrops]=/usr/lib/nagios/plugins/check_raindrops -w 512 -c 900 |
# from https://github.com/petey5king/raindrops-nagios | |
#!/usr/bin/env ruby | |
#script to check the unicorn backlog | |
#requires the nagios gem, raindrops and rubygems | |
$LOAD_PATH.unshift '../lib' | |
require 'rubygems' |
/path/to/unicorn/log/unicorn.stderr.log | |
/path/to/production/log/production.log | |
{ | |
daily | |
missingok | |
rotate 180 | |
compress | |
dateext | |
# this is important if using "compress" since we need to call |
before_migrate do | |
if app['main']['uses_bundler'] | |
link "#{release_path}/vendor/bundle" do | |
to "#{app['main']['deploy_to']}/shared/vendor_bundle" | |
end | |
common_groups = %w{development test cucumber staging production} | |
execute "LANG=en_US.UTF-8 LC_ALL='en_US.UTF-8' bundle install --deployment --without #{(common_groups -([app['main']['rails_env']])).join(' ')}" do | |
ignore_failure true | |
cwd release_path | |
environment ({'LANG' => 'en_US.UTF-8'}) |
redis = Redis.new(:host => config[:host], :port =>config[:port]) | |
redis.info.each do |k, v| | |
output "#{config[:scheme]}.#{k}", v | |
end |
haproxy_http_production: | |
command: /etc/sensu/plugins/haproxy/haproxy-metrics.rb -h my.hostname.com -q haproxy_stats -u username -p password -s my.hostname | |
handlers: ["graphite"] | |
interval: 60 | |
subscribers: ["sensu_server"] | |
type: metric | |
memcached_graphite_production: | |
command: /etc/sensu/plugins/memcached/check-memcached-graphite.rb -h my.hostname -p 11211 | |
handlers: ["graphite"] |