Hello
I have had an alert configured with a custom sql query to monitor the cpu that was working correctly:
SELECT *,AVG(processors.processor_usage) as cpu_avg FROM devices,processors WHERE (devices.device_id = ? AND devices.device_id = processors.device_id) AND (devices.status = 1 && (devices.disabled = 0 && devices.ignore = 0)) = 1 HAVING AVG(processors.processor_usage) > 95
Recently, this alert has started to fail:
Error in alert rule Lucia - WARNING - Average CPU Usage > 80% for 10 min (75): SQLSTATE[42000]: Syntax error or access violation: 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(), ...) with no GROUP columns is illegal if there is no GROUP BY clause (Connection: mysql, SQL: SELECT *,AVG(processors.processor_usage) as cpu_avg FROM devices,processors WHERE (devices.device_id = 315 AND devices.device_id = processors.device_id) AND (devices.status = 1 && (devices.disabled = 0 && devices.ignore = 0)) = 1 HAVING AVG(processors.processor_usage) > 80)
How can I solve that? Thanks