Advertisement
Guest User

Untitled

a guest
Sep 24th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. set idfile /var/.monit.id
  2. set statefile /var/.monit.state
  3.  
  4. # log file
  5. set logfile /var/log/monit
  6.  
  7. # set daemon mode timeout to 1 minute (10 seconds start delay)
  8. set daemon 60
  9. with start delay 10
  10.  
  11. # primary mailserver
  12. set mailserver out.alice.it port 25
  13.  
  14. # mail format
  15. set mail-format { from: info@mazatech.com }
  16.  
  17. # receive all alerts
  18. set alert info@mazatech.com
  19.  
  20. set httpd port 2812 and
  21. allow 0.0.0.0/0.0.0.0
  22. # login/password to access the web interface
  23. allow admin:monit
  24.  
  25. check process landorsea with pidfile "/var/run/landorsea.pid"
  26. start = "/etc/init.d/landorsea-daemon start"
  27. stop = "/etc/init.d/landorsea-daemon stop"
  28. if failed port 3000 then restart
  29. if cpu usage > 60% for 2 cycles then alert
  30. if cpu usage > 98% for 5 cycles then restart
  31. if 2 restarts within 3 cycles then timeout
  32. alert info@mazatech.com
  33.  
  34. check process influence_regions with pidfile "/var/run/influence_regions.pid"
  35. start = "/etc/init.d/influence_regions-daemon start"
  36. stop = "/etc/init.d/influence_regions-daemon stop"
  37. if failed port 3001 then restart
  38. if cpu usage > 60% for 2 cycles then alert
  39. if cpu usage > 98% for 5 cycles then restart
  40. if 2 restarts within 3 cycles then timeout
  41. alert info@mazatech.com
  42.  
  43. check process mongodb with pidfile "/var/run/mongod.pid"
  44. start = "/etc/init.d/mongodb-daemon start"
  45. stop = "/etc/init.d/mongodb-daemon stop"
  46. if failed port 3002 then restart
  47. if cpu usage > 75% for 3 cycles then alert
  48. if cpu usage > 98% for 5 cycles then restart
  49. if 2 restarts within 3 cycles then timeout
  50. alert info@mazatech.com
  51.  
  52. check process war4cards with pidfile "/var/run/war4cards.pid"
  53. start = "/etc/init.d/war4cards-daemon start"
  54. stop = "/etc/init.d/war4cards-daemon stop"
  55. if failed port 4000 then restart
  56. if cpu usage > 75% for 3 cycles then alert
  57. if cpu usage > 98% for 5 cycles then restart
  58. if 2 restarts within 3 cycles then timeout
  59. alert info@mazatech.com
  60. depends on mongodb
  61. depends on influence_regions
  62. depends on landorsea
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement