2

it seems that by default starting monit the first time when there is no state file(my state file gets blown away on reboot) will start all processes in monitored mode. I want to start the daemon in unmonitored mode, then start up each processes individually using "monit start" commands.

i can't seem to find any documentation in monit on how to do this.

richmb
  • 133
  • 1
  • 5

1 Answers1

3

On Ubuntu there is a script that gets run as soon as monit starts if it exists.

/etc/monit/monit_delay

You can simply add a monit unmonitor all to this script. And all monitoring will get disabled basically as soon as the service starts.

Zoredache
  • 128,755
  • 40
  • 271
  • 413
  • This works, but I'm trying to understand exactly what monit is doing. Does monit just run every script in this directory before starting the daemon? I can't find anything about this in the man page. – richmb Oct 01 '13 at 20:57
  • The Debian/Ubuntu startup script runs it. See `/etc/init.d/monit`. – Zoredache Oct 01 '13 at 21:32
  • Thanks! I'd upvote, but I don't have enough rep. – richmb Oct 02 '13 at 12:48
  • Any idea how to do something similar on CentOS? I suppose I could manually modify /etc/init.d/monit, if need be. – Nick Allen May 11 '16 at 15:37