If the application is stopped, monitor the stop state

Issue #378 on hold
Tildeslash repo owner created an issue

Currently when the application is stopped via monit, it becomes unmonitored and the user can start the application externally (this works as designed).

Some users however need to make sure that the stopped application was not started externally, i.e. if the application is started, make sure it is running and if it is stopped, make sure it is still stopped.

It is on the same page with requests where the user wants to make sure that some application is always stopped - in this case it is antonym of "if does not exists then <action>" test: ""if exists then <action>". The above described request is more dynamic ... uses "if does not exist" if the application was started and "if exists" if the application was stopped.

We can also cleanup the service state on stop ... currently both the status and monitoring status becomes "Not monitored":

Process 'myservice'
  status                       Not monitored
  monitoring status            Not monitored

Whereas it will be better if the status will reflect that the service is stopped (corresponds to current behaviour where monit stops checking the service):

Process 'myservice'
  status                       Stopped
  monitoring status            Not monitored

In the case that the user will stop the service so, that he wants to continue the stop state monitoring, the status may look like this:

Process 'myservice'
  status                       Stopped
  monitoring status            Monitored

Comments (4)

  1. Log in to comment