calculate server/host downtime

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jibla
Posts: 1
Joined: Wed Nov 14, 2018 3:25 pm

calculate server/host downtime

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: calculate server/host downtime

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked