Page 1 of 1

Duration data changed from 600 days to couple of minutes

Posted: Thu Jun 18, 2020 5:41 am
by termcap
I have a service that was experiencing a problem since 600+ days and was in WARNING state. Today we did some network changes that caused the plugin to fail and return UNKNOWN status for the service. Due to this the duration of the alert has now changed from 600+ days to a few minutes.

Is there any way how I can change the duration data to reflect the 600+ days of the alert ?

Is there any setting that I can make so that if we experience a network problem next time that causes failure of the plugin, we do not lose the real duration of the alert ?

Thanks,
Termcap

Re: Duration data changed from 600 days to couple of minutes

Posted: Fri Jun 19, 2020 3:49 pm
by cdienger
Host and service statuses are save in status.dat and have this line:

Code: Select all

last_state_change=1592405603
where the number is the time of the last change. You can modify this and restart the nagios server and it should display the date/time you change it to.

Re: Duration data changed from 600 days to couple of minutes

Posted: Sat Jun 20, 2020 11:51 am
by termcap
cdienger wrote:Host and service statuses are save in status.dat and have this line:

Code: Select all

last_state_change=1592405603
where the number is the time of the last change. You can modify this and restart the nagios server and it should display the date/time you change it to.
Thank you for the suggestion.

Will this cause any breakage of availability reports, trends, logs etc ? Will reload be enough or restart is a requirement after change in status.dat ?

Thanks,
termcap