From 09e5a1e4d6753b80cd5477d1dbb732c877db5b22 Mon Sep 17 00:00:00 2001 From: Vladimir Sharshov Date: Sat, 28 Jan 2012 02:56:52 +0400 Subject: [PATCH] Add NewRelic monitoring to autostart and watching --- config/production.pill | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/production.pill b/config/production.pill index f347a5941..9dd6fb06f 100644 --- a/config/production.pill +++ b/config/production.pill @@ -13,6 +13,15 @@ Bluepill.application(app_name) do |app| process.stop_command = "/usr/bin/env RAILS_ENV=production script/delayed_job stop" process.pid_file = File.join(app.working_dir, 'tmp', 'pids', 'delayed_job.pid') end + + app.process("newrelic") do |process| + process.start_grace_time = 10.seconds + process.stop_grace_time = 10.seconds + process.restart_grace_time = 10.seconds + + process.start_command = "/usr/bin/env /usr/local/bin/nrsysmond -c /etc/newrelic/nrsysmond.cfg" + process.pid_file = File.join(app.working_dir, 'tmp', 'pids', 'newrelic.pid') + end app.process("unicorn") do |process| process.start_grace_time = 8.seconds