[Solved] Database Table for Active Alerts
Posted: Sat Dec 16, 2017 8:52 am
Solved:
The API is in fact able to obtain this information by passing parameters to the URL.
https://nagios.server/nagiosxi/api/v1/o ... me_depth=0"
current_state (0/1/2): to determine if the host is in an ok/warning/critical state
cheduled_downtime_depth: to determine if the host is in scheduled downtime.
Hi,
I've been exploring the dataase trying to look for the table that holds all the current active warnings/criticals on Nagios but not had much luck in finding it.
Does such table exist?
My reasoning for this is we are looking to hook Nagios up to our ticking system (Supportworks) to auto log incidents for alerts that have been in a critical state for longer than 30 minutes (warnings and alerts less than this are not a concern).
I've had a quick look through the API and don't believe I can retrieve such information this way and so I was hoping to this information from the database.
We'd then pass the current alerts to a PHP script sitting between Naigios and Supportworks, confirm if that alert has been up for >30minutes, re-format the data and so pass it to the Supportworks API to log.
I've looked at event handlers, but I don't believe this will fit our needs as we do not want a ticket logged on a state change, just when the alerts has been up for longer than the 30minute threshold and only critical alerts.
Thanks.
The API is in fact able to obtain this information by passing parameters to the URL.
https://nagios.server/nagiosxi/api/v1/o ... me_depth=0"
current_state (0/1/2): to determine if the host is in an ok/warning/critical state
cheduled_downtime_depth: to determine if the host is in scheduled downtime.
Hi,
I've been exploring the dataase trying to look for the table that holds all the current active warnings/criticals on Nagios but not had much luck in finding it.
Does such table exist?
My reasoning for this is we are looking to hook Nagios up to our ticking system (Supportworks) to auto log incidents for alerts that have been in a critical state for longer than 30 minutes (warnings and alerts less than this are not a concern).
I've had a quick look through the API and don't believe I can retrieve such information this way and so I was hoping to this information from the database.
We'd then pass the current alerts to a PHP script sitting between Naigios and Supportworks, confirm if that alert has been up for >30minutes, re-format the data and so pass it to the Supportworks API to log.
I've looked at event handlers, but I don't believe this will fit our needs as we do not want a ticket logged on a state change, just when the alerts has been up for longer than the 30minute threshold and only critical alerts.
Thanks.