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

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
BlancaBasura
Posts: 2
Joined: Wed May 13, 2015 11:19 am

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

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
BlancaBasura
Posts: 2
Joined: Wed May 13, 2015 11:19 am

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

Post by BlancaBasura »

Thank you so much! I will try this out.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post by hsmith »

BlancaBasura wrote:Thank you so much! I will try this out.
Thank you. Please let us know what happens.
Former Nagios Employee.
me.
Locked