I am not really sure how this can be done with openrc but I think it would be a good idea to start the monit service after all other services have been startet on startup. Otherwise it will interfere with the normal system startup or runlevel change. At least it looked like that at the last startup of one of my servers where nearly everything is monitored via monit. For example my sshd was too early I guess (it did not bind to all ips it should have done...): Part of logs form last system startup: Nov 28 14:48:12 pluto monit[4134]: 'sshd' process is not running Nov 28 14:48:12 pluto monit[4134]: Cannot open a connection to the mailserver 'localhost:25' -- Transport endpoint is not connected Nov 28 14:48:12 pluto monit[4134]: No mail servers are available Nov 28 14:48:12 pluto monit[4134]: Aborting event Nov 28 14:48:12 pluto monit[4134]: 'sshd' trying to restart Nov 28 14:48:12 pluto monit[4134]: 'sshd' start: /etc/init.d/sshd Nov 28 14:48:12 pluto /etc/init.d/sshd[4282]: WARNING: sshd is already starting What do you think?
That's a mostly reasonable suggestion. What you could do as a temporary improvement is to delay monit - as far as I remember it has a startup timeout that can be set in the config, set that to maybe 5 minutes and it won't interfere with normal startup.
The delay in monitrc seems to be good solution. Feel free to close this bug. And thanks for the suggestion.
Created attachment 453974 [details, diff] monit patch Start after all services
I changed init.d to start after all services and it stop fisrt by when shutdown of server, the monit start again the services when stopped