Hi, All!
Zabbix WEB GUI show follow error message on tr_status.php page:
Simple solution:
Change api/classes/class.ctrigger.php file:
Zabbix WEB GUI show follow error message on tr_status.php page:
Code:
Error in query [SELECT DISTINCT t.*,i.hostid FROM triggers t,functions f,items i WHERE ((t.triggerid BETWEEN 1000000000000000 AND 1099999999999999)) AND (i.hostid IN (1001000000010027)) AND f.triggerid=t.triggerid AND f.itemid=i.itemid AND t.status=0 AND NOT EXISTS ( SELECT ff.functionid FROM functions ff WHERE ff.triggerid=t.triggerid AND EXISTS ( SELECT ii.itemid FROM items ii, hosts hh WHERE ff.itemid=ii.itemid AND hh.hostid=ii.hostid AND ( ii.status<>0 OR hh.status<>0 ) ) ) AND ((t.value=1) LIMIT 1001 OFFSET 0] [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 'LIMIT 1001 OFFSET 0' at line 1] mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource[/var/www/html/zabbix-1.8.2/include/db.inc.php:544] mysql_free_result(): supplied argument is not a valid MySQL result resource[/var/www/html/zabbix-1.8.2/include/db.inc.php:546]
Change api/classes/class.ctrigger.php file:
Code:
428c428 < $sql_parts['where']['ot'] = '((t.value='.TRIGGER_VALUE_TRUE.')'; --- > $sql_parts['where']['ot'] = '((t.value='.TRIGGER_VALUE_TRUE.'))';