I'm running SNMP Zenoss connected to mysql database.I'm trying to select the device that fails the most based on the sevrity level 5 and 4. Severity 5 is highest and 1 is the lowest. Table name is history.
-Column name called "devices" has all the device names.
-Column name called "events" has all the events that are generated.
-Column name called "severity" has severity levels from 5-1.
BELOW IS THE QUERY:
SELECT device,
count(*) AS number_of_events
from history
where severity = 5 and 4
GROUP BY Device
ORDER BY number_of_events DESC LIMIT 10
The query displays the top 10 devices that fail based on severity 5. I need based on severity 5 and 4.
PLEASE HELP
-Column name called "devices" has all the device names.
-Column name called "events" has all the events that are generated.
-Column name called "severity" has severity levels from 5-1.
BELOW IS THE QUERY:
SELECT device,
count(*) AS number_of_events
from history
where severity = 5 and 4
GROUP BY Device
ORDER BY number_of_events DESC LIMIT 10
The query displays the top 10 devices that fail based on severity 5. I need based on severity 5 and 4.
PLEASE HELP