Messed up my rrd's with a bad clock...

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Aviewanew
Posts: 5
Joined: Fri Jun 26, 2009 3:11 pm

Messed up my rrd's with a bad clock...

Post by Aviewanew »

Due to a typo (and then forgetting the syntax) I accidently set my clock forward to 2022. Then cacti's poller ran. I set my clock back, but by then the last run time in cacti's database was in 2022.

I edited the value in the table, and ran cacti's poller successfully. However, now it seems all of the RRD's are screwed.
ERROR: /var/www/localhost/htdocs/admin/cacti/rra/ext_output_142.rrd: illegal attempt to update using time 1246046483 when last update time is 1662955232 (minimum one second step)
I could wipe out the rrd's and start over, but I have 6 months of history I'd like to keep. Is there any way to delete any data from the RRD's after, say 2015, to repair them and let new data enter?
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Export your RRDs to XML (man rrddump), replace all entries with times in the future with 'NaN' and then set the lastupdate to '0' (zero).

Restore the RRD files (man rrdrestore) and you should be good to go.

Should be quite simple to wrap this in a script...
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Aviewanew
Posts: 5
Joined: Fri Jun 26, 2009 3:11 pm

Post by Aviewanew »

Linegod wrote:Export your RRDs to XML (man rrddump), replace all entries with times in the future with 'NaN' and then set the lastupdate to '0' (zero).

Restore the RRD files (man rrdrestore) and you should be good to go.

Should be quite simple to wrap this in a script...
Thanks for the reply. I've exported them, and looked through them, and I can't find any data. The only dates in the exports are in 2022, or 2021, or 2020 sometimes. I suspect that since my RRD's were set up in 5 min, hour, daily, weekly, yearly, and 5-year mode (not sure what you call it); that when it saw 2022, it dumped all of this "old" data. Does that seem right?
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Yup. Didn't really pay attention to how far in the future it was - you're data is 'gone'.

No backups?
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

:o :( :oops: :cry:

Sorry about that. Maintaining clock is "essential". This is one of the reasons I fear VM's. It's only a fear, like that of heights, cold water, tomatoes, artichokes, etc.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Aviewanew
Posts: 5
Joined: Fri Jun 26, 2009 3:11 pm

Post by Aviewanew »

Linegod wrote:Yup. Didn't really pay attention to how far in the future it was - you're data is 'gone'.

No backups?
Of course! I back them up nightly!

Of course I don't keep rolling backups, only next-day. And I didn't stop the backup job until the next day. Ah well. Thanks for the help!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests