Re: Is there a way to tell Monit to monitor by default all new services?

Lutz Mader <[email protected]> Thu, 6 Aug 2020 22:12:40 +0200
Newsgroups gmane.comp.monitoring.monit.general
Message-ID <[email protected]>
Hello Ciprian,
nice to see what is going on.

> Once I experiment I'll report back.

This is one of my services with "mode passive".

check process Gen_lfbw matching "\/bin\/[Jj]ava.*genservers\/lfbw\/"
  start program "/usr/local/etc/monit/scripts/genlfbw.sh start" with
timeout 60 seconds
  stop program "/usr/local/etc/monit/scripts/genlfbw.sh stop" with
timeout 30 seconds
  restart program "/usr/local/etc/monit/scripts/genlfbw.sh restart" with
timeout 120 seconds
  mode passive
#  if not exist for 5 cycles then start
#  if 5 restarts within 50 cycles then unmonitor
  depends on Gen_lfbw_Dir
  group Liberty

With regards,
Lutz