Hi,

the swap test can be used in the system-wide "check system" only, you can use 
it like this:

--8<--
check system mymachine
    if swap usage > 70% then exec "/usr/bin/monit restart apache"

check process apache with pidfile ...
--8<--

Regards,
Martin



On Mar 21, 2012, at 11:38 AM, Simone D. wrote:

> Hi all,
> I'm quite new with monit so I hope you will be able to help me.
> 
> I have monit running on my CentOS 5.x and it is checking everything fine. I 
> would like to restart apache if swap usage is > 70%, how to do it?
> Have I to put "if swap > 70% then restart" in "check process apache.." or 
> there is a way to restart apache in "check system .."?
> 
> Thank you very much,
> Simone
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


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

Reply via email to