Skip to content

Instantly share code, notes, and snippets.

@suciuvlad
Last active August 29, 2015 14:12
Show Gist options
  • Save suciuvlad/495231b8ae8ba8c9a572 to your computer and use it in GitHub Desktop.
Save suciuvlad/495231b8ae8ba8c9a572 to your computer and use it in GitHub Desktop.
monit nginx and upstart services
check process nginx with pidfile "/var/run/nginx.pid"
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
group www-data
if failed port 80 protocol HTTP
request /ok
with timeout 5 seconds
then restart
check process nodejs with pidfile "/var/run/fyves-renderer-8001.pid"
start program = "/sbin/start fyves-renderer-8001"
stop program = "/sbin/stop fyves-renderer-8001"
if failed port 8001 protocol HTTP
request /
with timeout 10 seconds
then restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment