Skip to content

Instantly share code, notes, and snippets.

@tilakpatidar
Created April 19, 2017 08:47
Show Gist options
  • Save tilakpatidar/611ec591cf84536454c718d87b4eb832 to your computer and use it in GitHub Desktop.
Save tilakpatidar/611ec591cf84536454c718d87b4eb832 to your computer and use it in GitHub Desktop.
Monit monitor process without pid instead using HTTP request
check host appsrv1 with address 127.0.0.1
start program = "/sbin/start myapp"
stop program = "/sbin/stop myapp"
alert [email protected] on {timeout,connection}
if failed port 9009 protocol HTTP
request /
with timeout 3 seconds
then restart
if 10 restarts within 10 cycles then timeout
if 10 restarts within 10 cycles then exec "/usr/bin/monit start aws-dns-healthcheck"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment