Hi After one of my sites was hacked monitor pages does not work. I am getting the following error on the top of the page. #0 db->query(SELECT DISTINCT type, data FROM monitor_data WHERE server_id = 1) called at [/usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php:211] #1 db->queryAllRecords(SELECT DISTINCT type, data FROM monitor_data WHERE server_id = 1) called at [/usr/local/ispconfig/interface/web/monitor/show_sys_state.php:194] #2 _getServerState(1, websrv.allnetworks.gr, ) called at [/usr/local/ispconfig/interface/web/monitor/show_sys_state.php:115] #3 _getSysState() called at [/usr/local/ispconfig/interface/web/monitor/show_sys_state.php:63] Any ideas how can i fix that
Run the query: SELECT DISTINCT type, data FROM monitor_data WHERE server_id = 1; with PHPMyAdmin in the dbispconfig database and post the error message that PHPMyAdmin shows you.
Hi The error after executing the query #144 - Table './dbispconfig/monitor_data' is marked as crashed and last (automatic?) repair failed
That solved the problem thanks. One more thing when the site was hacked, none of the services did work because of high cpu usage. How can i avoid this? Is antivirus checking the files on the webserver?
The clamav antivirus is scanning only the incoming emails. Generally you can use clamav to scan the whle server as well, but clamav is not that good in finding malware in websites. A better approach is to use something like maldetect or use ISPProtect which is specialized on website malware and has a way higher detection rate then the twi former mentioned systems. There is a free trial of ISPProtect and I'm one of its developers. http://ispprotect.com/
What about the cpu usage that made my server stopped after a site is hacked. Is there a way to avoid this?
You can monitor the cpu usage of your server e.g. with monit and munin and get an alert when it reaches a critical level.