Hey all,

We have had this issue as a result of migrating clients from old switches to new replacement switches, so I wrote a PHP script which properly merges two RRD files around a given timestamp.  I had experimented with the merge scripts already out there, but none really worked too well (if at all), so I wrote this one specifically with observium RRDs in mind.

It isn't as user friendly as it ideally could be, in that you have to figure out the UNIX timestamp where you want to work around, and also which RRDs you need (by finding the ifIndex using a db query based on each port's ID), and the resulting new RRD is not put into the place of the 2nd "old" RRD automatically..... but it does the job perfectly well otherwise.

Be sure to take a backup of the two RRDs (especially the 2nd "old" one, which you will end up replacing with the new RRD) before running the script.  I usually copy the two RRDs to a different directory, run the script, remove the 2nd "old RRD" from its path in rrd/<device>/<oldRRD2>, and then copy the newRRD to the path that the old one was in.  Also, it may be necessary for you to chown the newRRD to the appropriate user afterwards.

It probably wouldn't be too much more work to integrate it into the GUI somehow, and have it do everything pretty much automatically (a revert option would be prudent to add if it were automated to replace the existing data, of course)

Adam/Tom/Mike: If such a "built-in" feature is desirable for everyone, whether from the CLI in the scripts folder, or from the GUI, I would be more than happy to help make it so, or otherwise just let you guys use the code as a basis for doing so.

If anyone has questions on how to use the script, or if there are problems with it, let me know.

-Joe

On 12/17/2015 12:16 PM, Simon Smith wrote:
I neally had it and was so happy! i found a script that actually worked!

only issue I’m having, is its NOT adding new data to the new merged rrd file even tho all permissions/file names/etc are the same ?

BUT if you do as the site says, the rrd file gets joined together and it shows correctly in the web panel, when u copy it back over

any ideas?

http://www.localhostrich.com/how-to-merge-rrd-files-cacti/ - backed by code from https://gist.github.com/arantius/2166343

Simon

On 17 Dec 2015, at 3:08 pm, Tom Laermans <tom.laermans@powersource.cx> wrote:

Simon,

I don't know if there is a way to merge RRDs... you could try and see if google has a solution. That way you could keep both parts of the equation ;) But I have no experience with this, so...

Tom

On 2015-12-17 16:05, Simon Smith wrote:
Hi Tom,

POO…. i did think that was the only option!

I will have lost about 3 hours of data today :(

I will just have to put up with it for the moment, let it repopulate, and fingers and toes, i don’t need to look back on the graphs later on life

Simon

On 17 Dec 2015, at 3:02 pm, Tom Laermans <tom.laermans@powersource.cx> wrote:

Hi Simon,

Joining ports is not an option unfortunately, you can copy the RRD file from the old port to the new one's though - but that'll remove data added in between the switch and now.

Tom

On 2015-12-17 15:27, Simon Smith wrote:
Hi All,

this is a bit of a daft question,

I actually deleted one of our bridges on our mikrotik switches, and had to recreate them, DOH!

the observium, then discovered the new bridge, but deleted the old bridge (marked as deleted)?

now i have no graphs with old data in them for the new bridge :(

can i join the new bridge and old bridge ports together in observium so i can see the old graphs in the new bridge?

regards

Simon


_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium

_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium



_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium