Code: Select all
|2014-06-19 19:55:07| |100-Facility-PRSense| |ISP2_Interface_Ping| |OK| |HARD| etc.
|2014-06-19 19:50:17| |100-Facility-PFSense| |ISP2_Interface_Ping| |CRITICAL| |HARD100-Facility-PFSense is the host and ISP2_Interface_Ping is the service (each of the PFSense routers will have an ISP1 and ISP2 interface ping).
I need to translate that data into:
Code: Select all
| Date | |Facility| |ISP| |Time Down| |Time Up| |Total| | Impact |
|6/19/2014| | 100 | | 2 | | 7:50PM | |7:55PM | |5min | |No impact |Each facility has an ISP1 and ISP2 with 1 being the primary and 2 being the secondary at much lower bandwidth. If ISP2 goes down, there is no impact because the primary is still up. If ISP1 goes down, the impact is "Slow" because the secondary ISP has much lower bandwidth. If both go down, the impact is "Down" because the facility has lost all internet connectivity.
Currently, I have to go through the state history and find each instance of "CRITICAL", note the date, time, facility, etc. and scroll up until I find an "OK" for that same facility and ISP. We have enough facilities with enough incidents that doing a weekly report takes two hours and I'm being asked to do a report that goes back three months.
What I'm asking is, how can I go about automating this report and exporting it to an excel sheet or CSV? I'm sure that scripts can be written to grab the data from Nagios directly and I'm sure command line or powershell or visual basic scripts can be used to parse the data from a CSV exported from NagiosXI into an Excel sheet. There may also be a way do it directly in Excel but my Excel expertise is even thinner than my linux. There may even be a nagios plugin for this functionality but I haven't been able to find one. I don't care which of these methods I end up using; I just need to figure out a way to speed this process up so I can get this reporting done in a reasonable time rather than devoting the next two weeks to it.