Page 1 of 1

calculate server/host downtime

Posted: Wed Nov 14, 2018 3:39 pm
by jibla
hi guys

I was wondering if it is possible to calculate the server or host downtime and send it via notification?

currently the notifications only send the date and time the service went down, then another notification the service is up at date-time

is it possible to calculate the downtime with the service up notification?

for example: service XX UP - downtime: 30 minutes

thanks and regards

Re: calculate server/host downtime

Posted: Wed Nov 14, 2018 5:26 pm
by npolovenko
Hello, @jibla. There is no such functionality. Nagios stores timestamps of the events(downtime start or downtime stop), but it doesn't keep track of the time between them. You could write your own script that would subtract one event timestamp from another, and calculate the difference. That is the technique used by some reports in Nagios to show how long the host was down during X period of time.