How do I restart MySQL in monit when page contains specific text?

Posted by Tyler on Server Fault See other posts from Server Fault or by Tyler
Published on 2012-06-30T00:01:58Z Indexed on 2012/06/30 3:17 UTC
Read the original article Hit count: 419

Filed under:
|
|

How do I check if a web page contains the text "Error connecting to database" and if the text exists in the page restart the database?

Here's what I have so far but it isn't working:

check host website.com with address website.com
   group database
   start program = "/usr/bin/service mysql start"
   stop program = "/usr/bin/service mysql stop"
   if url http://website.com content == "Error connecting to database" then restart

© Server Fault or respective owner

Related posts about linux

Related posts about ubuntu