Duration data changed from 600 days to couple of minutes

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
termcap
Posts: 27
Joined: Sun Nov 27, 2016 3:09 pm

Duration data changed from 600 days to couple of minutes

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
termcap
Posts: 27
Joined: Sun Nov 27, 2016 3:09 pm

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

Post 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
Locked