Page 1 of 2
Outage / Availability Report
Posted: Fri Sep 05, 2014 11:19 am
by belvdr
Is it possible to generate a report that lists only those hosts and/or services that have experienced an outage of at least x minutes?
Re: Outage / Availability Report
Posted: Fri Sep 05, 2014 12:07 pm
by lmiltchev
You can try setting up a custom time period (for example: from "2014-09-05 10:00:00" to "2014-09-05 10:15:00") with the State History report. If this is not what you are looking for, you are welcome to post a feature request for this type of report on our official bug
tracker or I can post it for you if you want me to.
Re: Outage / Availability Report
Posted: Fri Sep 05, 2014 12:12 pm
by belvdr
I was looking at that, but is too detailed and doesn't let me filter what I need. I am looking for something like the following:
Code: Select all
Host Start Outage End Outage
abc 10/1/2013 10:02am 10/1/2013 2:16pm
...
So it would only list the hosts and/or services and their associated outage times that are greater than 30 minutes. For example, if host def experienced an outage of 29 minutes or less, it would not be included in the report.
I'm also open to writing a SQL report and pulling it into SQL Server Reporting Services if I were to get my hands on a query (hint hint).

Re: Outage / Availability Report
Posted: Fri Sep 05, 2014 1:00 pm
by lmiltchev
I filed an internal feature request (TASK ID 3942). There is no guarantee when/if this is going to be implemented. Bug fixes have priority over feature requests. If you would like to get it done sooner, contact
[email protected] and request a quote for custom development.
Re: Outage / Availability Report
Posted: Fri Sep 05, 2014 4:59 pm
by belvdr
Can I get some details about which tables to query so I could develop something internally for now?
Is it in MySQL or PostgreSQL?
Re: Outage / Availability Report
Posted: Mon Sep 08, 2014 9:48 am
by abrist
You can look at:
the mysql database "nagios", specifically the following tables:
Code: Select all
nagios.nagios_statehistory (record of state changes)
nagios.nagios_downtimehistory (record of scheduled downtime)
nagios.objects (relations)
Just an FYI: We did have this request a week or so ago, so I have already filed and internal feature request with the dev team.
Re: Outage / Availability Report
Posted: Tue Sep 09, 2014 8:38 am
by belvdr
Great, thanks for the info. I'll see what I can come up with.
Re: Outage / Availability Report
Posted: Tue Sep 09, 2014 9:01 am
by slansing
Awesome, keep us posted!

Re: Outage / Availability Report
Posted: Wed Sep 10, 2014 7:05 am
by belvdr
I'm looking at nagios_statehistory and it appears to have what I need, but how are you handling finding the previous state?
I found this post from 2007, but there's no reply (a good idea too):
http://support.nagios.com/forum/viewtop ... 72&p=66125
For example, I have a host that has state changes for CPU usage over the course of a day. How can I relate an OK back to its original WARNING or CRITICAL?
Re: Outage / Availability Report
Posted: Wed Sep 10, 2014 4:56 pm
by abrist
The state changes should chronological. So if an OK and then HARD PROBLEM state for the same object are recorded, you can assume OK until the time of the HARD PROBLEM state.