Outage / Availability Report

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
belvdr
Posts: 81
Joined: Tue Oct 08, 2013 9:17 pm

Outage / Availability Report

Post 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?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Outage / Availability Report

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
belvdr
Posts: 81
Joined: Tue Oct 08, 2013 9:17 pm

Re: Outage / Availability Report

Post 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). :)
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Outage / Availability Report

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
belvdr
Posts: 81
Joined: Tue Oct 08, 2013 9:17 pm

Re: Outage / Availability Report

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Outage / Availability Report

Post by abrist »

You can look at:

Code: Select all

nagios logs
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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
belvdr
Posts: 81
Joined: Tue Oct 08, 2013 9:17 pm

Re: Outage / Availability Report

Post by belvdr »

Great, thanks for the info. I'll see what I can come up with.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Outage / Availability Report

Post by slansing »

Awesome, keep us posted! :)
belvdr
Posts: 81
Joined: Tue Oct 08, 2013 9:17 pm

Re: Outage / Availability Report

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Outage / Availability Report

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked