> On 27 Apr 2016, at 18:25, Ani A <[email protected]> wrote:
> 
>> Hello,
>> 
>> the monitoring state is saved persistent across monit restarts - saved to a 
>> state file. The default state file path is ~/.monit.state, you can customize 
>> it using "set statefile <path>" statement in monit configuration file. If 
>> you need to reset the state after each machine reboot, either do "monit 
>> monitor all" in the monit startup script or place the statefile to some 
>> volatile filesystem (for example /tmp is often mounted using tmpfs/ramdisk).
>> 
>> Regards,
>> Martin
>> 
>> 
> 
> Hi  Martin,
> 
> When you say "monit startup script", is that something that is also to
> be configured?
> Or, is it something that has to be added as a part of the monit
> service script (/etc/init.d/monit) ?
> In my Ubuntu installation I didnt see any startup-script that is being
> invoked, however
> I saw some references to such a script on github.
> How do I enable/add a startup-script ?
> 
> Thanks
> --
> Regards,
> Ani


The startup script depends on your system ... traditional SysVinit may use 
/etc/init.d/monit, other platforms use systemd, upstart, etc. Each of these 
systems have different way how you can modify the startup method (and where to 
place "monit monitor all").

The simplest way for reseting the state is to place the state file to a /tmp/ 
filesystem as mentioned (no need for "monit start all" then).

Best regards,
Martin
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to