monit-general
[Top][All Lists]
Advanced

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

Re: [monit] Is this possible?


From: Pierrick Grasland
Subject: Re: [monit] Is this possible?
Date: Thu, 31 Jul 2008 15:55:50 +0200

Hello,

I hope to correctly understand your problem :

executing a script after mysql restart.

So, my first solution is below :

From the manual :

IF CHANGED [MD5|SHA1] CHECKSUM [[<X>] <Y> CYCLES] 
THEN action


or

IF CHANGED TIMESTAMP [[<X>] <Y> CYCLES] THEN action


I think you can adapted this as follow :

 check file mysqlpidfile path <path of pidfile>
if changed sha1 checksum
then exec "mysqlreload.sh"


Add a simple :

check process mysql with pidfile mysqlpidfile
start = "..."
stop = "..."

And I think you have it.

(when mysql restart, it will have a new pid, so a different checksum or timestamp

I'm not sure of the syntax (can't test), but I think it will work.

Regards,


--
Pierrick Grasland


reply via email to

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