monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with swap


From: Simone D.
Subject: Re: help with swap
Date: Wed, 21 Mar 2012 11:53:20 +0100
User-agent: Postbox 3.0.3 (Macintosh/20120304)

Thank you very much Martin, it works very well.

I changed it a bit doing:

if swap > 70% then exec "/etc/init.d/httpd restart"

In this way I also receive alert from monit because apache changed pid (in this way I know it was restarted)

Thank you!
Simone
21 marzo 2012 11:41
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



21 marzo 2012 11:38
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]