Scout Realtime Install
#0. Install gem on server:
gem install scout_realtime
scout_realtime start
hemingway.qrohlf.com:5555 works now!
#1. Setup nginx reverse proxy:
create site:
/etc/nginx/sites-available/hemingway
server {
server_name hemingway.qrohlf.com www.hemingway.qrohlf.com;
listen 80;
location / {
proxy_pass http://localhost:5555; #serve realtime traffic with scout
}
}
enable it
cd sites-enabled
sudo ln -s ../sites-available/hemingway .
sudo nginx -s reload
hemingway.qrohlf.com now shows stats!
#2. Setup upstart init script
/etc/init/scout.conf
# Scout Realtime Server Monitoring
description "Scout Realtime"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
umask 022
exec /usr/local/bin/scout_realtime -f
Start the service:
sudo service scout start
"Crash" the service
sudo service scout status # note the pid
sudo kill -9 [pid]
Marvel at how the service is automatically restarted!
could you do a systemd script for scout realtime?