Our monitoring tool keeps sending Down alert after a specific time interval if the application goes down. Once it comes up, the tool sends only 1 UP alert. So we get multiple Down events and single UP event, say for an outage. So output would be like:
UP 2014-05-13 08:08
Down 2014-05-13 07:58
Down 2014-05-13 07:48
Down 2014-05-13 07:38
Down 2014-05-13 07:28
UP 2014-05-12 16:08 #old outage UP event
Down 2014-05-12 15:58
.
.
.
Is there any way, we can find uptime using this data. Apps like pinger can also find Uptime, but we need to extract other fields that we are getting in our data source for our further reports along with uptime.
So far the logic that we can apply is that a loop checks every record in the output, when it finds an UP event, its time is picked up and the time of next Down event. the difference of those can be added in a variable incrementally for such UP-Down events occurrences.
Thanks in advance!
... View more