Page 1 of 1

Passive Checks Have 01-01-1970 00:00:08 as Last Check Time

Posted: Tue Aug 11, 2015 5:35 pm
by BlancaBasura
A developer recently added a large volume of passive checks. They all have the Unix Epoch as the Last Check Time, and the duration is currently 16658d 22h 34m 11s. He added some other checks today, and the time stamp is fine. Does anyone know how I can clean up this erroneous time stamp? Thanks.

Re: Passive Checks Have 01-01-1970 00:00:08 as Last Check Ti

Posted: Wed Aug 12, 2015 1:59 am
by Box293
These are going to be in the retention.dat file, usually, /usr/local/nagios/var/retention.dat.

It will be in the last_check= field I think, I'm pretty sure it will be last_check=0.

You should be able to sed this file and replace the old value with a current, more realistic value.

I would stop the nagios service
Then this command should replace the value with a new one:

Code: Select all

sed -i 's/^last_check=0/last_check=1439187434/g' /usr/local/nagios/var/retention.dat
Then start nagios.

I would take a copy of retention.dat first and have a play with it to make sure I've given you a valid command.

Re: Passive Checks Have 01-01-1970 00:00:08 as Last Check Ti

Posted: Wed Aug 12, 2015 6:39 pm
by BlancaBasura
Thank you so much! I will try this out.

Re: Passive Checks Have 01-01-1970 00:00:08 as Last Check Ti

Posted: Thu Aug 13, 2015 9:27 am
by hsmith
BlancaBasura wrote:Thank you so much! I will try this out.
Thank you. Please let us know what happens.