Skip to content

Instantly share code, notes, and snippets.

@yaegashi
Created July 13, 2012 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaegashi/3102130 to your computer and use it in GitHub Desktop.
Save yaegashi/3102130 to your computer and use it in GitHub Desktop.
Minimal monit config example
# /etc/monit/monitrc
set daemon 60
set logfile /var/log/monit.log
set idfile /var/lib/monit/id
set statefile /var/lib/monit/state
set eventqueue basedir /var/lib/monit/events slots 100
set mailserver mail.example.com
set alert monit@example.com
set httpd port 2812 and use address localhost allow localhost
include /etc/monit/conf.d/*
# /etc/monit/conf.d/service_name
check process service_name pidfile /path/to/service.pid
start "/path/to/start-stop-script start" uid your_name gid your_group
stop "/path/to/start-stop-script stop"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment