View Single Post
  #3 (permalink)  
Old 11-30-2007, 01:17 PM
cpane1's Avatar
cpane1 cpane1 is offline
Registered User
 
Join Date: Jun 2007
Posts: 50
cpane1 is on a distinguished road
Quote:
Originally Posted by darren.nolan View Post
I believe cPanel will send you an email every 5 minutes if one of your monitored services is down - Under WHM -> Service Manager -> Ensure the box to monitor MySQL is selected.

With your cron - change it to;

*/20 * * * * /usr/bin/php -q /home/username/public_html/admin/mysqlstat.php

-q is quiet or not header mode (might explain why you are getting blank emails?) - and have your mysqlstat.php file generate an email if the service is down.

From LinuxHelp.net http://www.linuxhelp.net/guides/cron/
>> /dev/null 2>&1 part means to send any standard output to /dev/null (the linux trash can) and to redirect standard error (2) to the same place as the standard output (1). Basically it runs the command without any output to a terminal etc.

Hope this helps
Hiya,

Thanks for your response on this, but I am using this cron for a client ..hosted on the server.

I simply want to make the cron email him only if there is a failure or errors with mysql server... I do not want the BLANK emails every 20 minutes...

Please help....
__________________
Regards,
cPane1®
Reply With Quote