If you have a linux - Plesk server along with the Watchdog module you have certainly noticed that. Since January 1rst, 2011 you are receiving email notifications from Cron Daemon describing an WDExc error with subject like "Cron /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats day"
Something like that:
ERROR: WDExc
Error occurred while processing database query: 'MySQL query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by service_id, type, round(unix_timestamp(time) / 200, 0) having count(val' at line 3'
0: wdlib.php:1088
wd__db_query(string 'select service_id, type, unix_timestamp(min(time)) as min_time, unix_timestamp(max(time)) as max_time, avg(value) as avg
from module_watchdog_sys_stat where
group by service_id, type, round(unix_timestamp(time) / 200, 0) having count(value) > 1 limit 10000;')
1: pack-sysstats:63
pack_statistics(integer '200', boolean false, boolean false)
2: pack-sysstats:44
Solution :
1. Download below the .zip correspoding to your Plesk version using wget :
1 for Plesk 8.6 ::
2. for Plesk 9.0 ::109.75.169.121/260_53_5_watchdog-2011-for-86.zip
3. for Plesk 9.5 and for Plesk 10 ::109.75.169.121/260_53_5_watchdog-2011-for-9.zip
109.75.169.121/260_53_5_watchdog-2011-for-95-10.zip
2. unzip where you like
3. backup existing filesunzip "downloaded file name
4. Restores the downloaded files ::mv /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats.bak
mv /usr/local/psa/admin/htdocs/modules/watchdog/stats-graph.php /usr/local/psa/admin/htdocs/modules/watchdog/stats-graph.php.bak
5. permissions for pack-sysstats (i guess you logged in as root)mv pack-sysstats.sh /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats
mv stats-graph.php /usr/local/psa/admin/htdocs/modules/watchdog/stats-graph.php
Check your watchdog stats... it worked!chown rootsaadm /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats
chmod 754 /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats
-----------
Andre D,
Supp0rt Team![]()


saadm /usr/local/psa/libexec/modules/watchdog/cp/pack-sysstats
Reply With Quote
