<% @path = '/etc/monit/monit.d/monit-postgresql.conf' %> check process postgresql with pidfile <%= rubber_env.postgresql_pid_file %> group postgresql-<%= RUBBER_ENV %> start program = "<%= rubber_env.postgresql_ctl %> restart" stop program = "<%= rubber_env.postgresql_ctl %> stop" if failed host 127.0.0.1 port 5432 protocol pgsql then alert if 5 restarts within 5 cycles then timeout