Last active
February 11, 2016 04:20
-
-
Save monodeep12/56c0aba0e9321c69532f to your computer and use it in GitHub Desktop.
monit config file for monitoring a go app server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
check process hulk_server | |
with pidfile /opt/go/src/github.com/xxxx/yyyy/hulk.pid | |
start program = "/home/hulk/media_planner/run_hulk_server.sh" as uid hulk and gid hulk | |
stop program = "/bin/bash -c 'fuser -k 5000/tcp'" | |
if failed host x.x.x.x port 5000 then alert | |
if failed host x.x.x.x port 5000 then restart | |
if 5 restarts within 5 cycles then timeout | |
if cpu > 60% for 2 cycles then alert | |
if cpu > 80% for 5 cycles then restart | |
if loadavg(5min) greater than 10 for 8 cycles then stop | |
if totalmem > 600.0 MB for 5 cycles then restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is what I have in the shell script (run_hulk_server.sh) :