Quote:
Originally Posted by darren.nolan
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....