Thanks Lutz,

Sadly I always get an “alert”, with the description "process is not running”. 
It makes sense, the process is not running. But I don’t care if the process is 
not running - I’m only interested in alerts if the process is running and the 
memory consumption is too high.

It looks like I have to provide my own script to do the logic and do something 
like…

check program blob path /usr/local/bin/blob-check.sh timeout 10 seconds
  if status != 0 then alert

Sadly this means I have to put the logic and thresholds in the script so it’s 
not as easy to adjust as the test (if memory usage > 8 MB) is now in the 
script/program.

Ideally, my problem would be solved if I could disable the "process is not 
running” alert.

Alan Christie
[email protected]



> On 8 Nov 2018, at 6:49 pm, [email protected] wrote:
> 
> Hello Alan,
> you can use something like this to enable memory monitoring only.
> 
> check process blob matching “blob-process”
>  start program "your command"
>  stop program "your command"
>  if memory usage > 8 MB then alert
>  mode passive
> 
> Monit does not start the application, the mode is passive, but monitor the 
> matched process.
> But  you should not stop the application via monit, because the service  
> became "Not monitored" and the memory check will disabled also.
> 
> 
> 
> A suggestion only,
> with regards,
> Lutz
> 
> p.s.
> See https://mmonit.com/monit/documentation/monit.html#SERVICE-MONITORING-MODE
> and https://mmonit.com/monit/documentation/monit.html#Process-resource-tests
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general

-- 
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to