• 14

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

On restart, start with “monitor all” enabled

I have monit enabled and monitoring one of my applications, where if the application restarts more than 4 times in 10 cycles, I stop it, and run a script (which, among other action, also does unmonitor all, and stops monit)

Now, if I manually start my application and monit again, monit starts out with monitoring disabled on all the applications. Is it possible to say somewhere in the monitrc or other configs to monitor all on start?

I could have issued the command monit monitor all from my scripts, but there is a startup delay configured for monit, and I will have to wait until the HTTP connection is up, to issue the command. Instead it will be good to have monit start with monitoring enabled for all.

I am on the latest 5.17, built from source on Ubuntu trusty.

It is not possible to specify monitor all within a configuration file, rather than issuing a unmonitor all why not just stop monit?

  • 0
Reply Report
    • No, there is no such config called monitor all that can be added in the monit config file. The reason I need to unmonitor is because of the counters - if I dont do this, the restart counters are not reset
      • 2
    • Maybe you could try to delete the monit state file in order to reset the counter. Default monitoring mode is on, so deleting the file would remove all your unmonitor flags and counter values). Doc says : -s statefile Write state information to this file. Or use "set statefile" in monitrc.

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags