I am trying to get the amount of alarms for the past hour. it seems i can get this successfully from the nagios_statehistory table by the following query:
Code: Select all
SELECT count(*) FROM nagios.nagios_statehistory where state_time > CURRENT_TIMESTAMP - INTERVAL 1 HOUR;As for the other case, I am requested to gather the amount of pending alarms (i.e alarms that are still active , irrelevant of the time). For this i'm not sure if i can get it from the same table.
How can i achieve this?
Thanks in advance