monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'restart program' directive?!


From: Josh Sharpe
Subject: 'restart program' directive?!
Date: Sun, 7 Jul 2013 10:33:31 -0400

I've noticed that a config like this is valid:

check process unicorn_master
  with pidfile /tmp/unicorn.master.pid
  start program = "/etc/init.d/unicorn start" as uid blue
  stop program = "/etc/init.d/unicorn stop" as uid blue
  restart program = "/etc/init.d/unicorn restart" as uid blue


...and by "valid" I mean, monit doesn't choke on the syntax when I restart it.  So, there must be something to this "restart program" directive of which I can find no documentation.

That said, it doesn't really work either.

"monit restart unicorn_master" is invoking the 'stop' task and then the 'start' task.  Which is not ideal since stop + start doesn't produce the same graceful restart that the restart init script does.

So,
1) Does the directive 'restart program' exist?  Should it work?
2) If not, why doesn't monit choke on that directive.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]