mcdarren / rrdtool-merge Goto Github PK
View Code? Open in Web Editor NEWCommand line tool for merging RRDTool files.
Command line tool for merging RRDTool files.
An error that appeared while I have launched the script:
Can't call method "text" on an undefined value at rrdtool-merge.pl line 61
I could fix it and finally run the script thanks to Claude I. D. at webpage http://w3facility.org/question/merge-multiple-rrds-over-time/
The solution was replacing in line 61 this code:
my $xff = $new_rra->first_child( 'xff' )->text;
with this one:
my $xff = $new_rra->first_child_text( 'xff' );
Claude I. D. derived this solution from XML::Twig documentation which says this:
first_child_text ($optional_condition)
Return the text of the first child of the element, or the first child
matching the $optional_condition If there is no first_child then returns ''. This
avoids getting the child, checking for its existence then getting the text for trivial
cases.
Many thanks to Darren Murphy for nice script and Claude I. D.! for his post I was able to merge all rrd files that I needed.
I hope that it would help also to the others.
i am recieving error below
perl rrdtool-merge.pl --oldrrd=/var/lib/cacti/rra/fezziwig_-terminal_server_hdd_used_510.rrd --newrrd=/var/lib/cacti/rra/fezziwig-terminal_server_hdd_used_509.rrd
Dumping /var/lib/cacti/rra/fezziwig-terminal_server_hdd_used_510.rrd to XML: /tmp/fezziwig-terminal_server_hdd_used_510.rrd_old_4480.xml
Dumping /var/lib/cacti/rra/fezziwig-terminal_server_hdd_used_509.rrd to XML: /tmp/fezziwig-terminal_server_hdd_used_509.rrd_new_4480.xml
Parsing /var/lib/cacti/rra/fezziwig-terminal_server_hdd_used_510.rrd XML......parsing completed
Parsing /var/lib/cacti/rra/fezziwig-_terminal_server_hdd_used_509.rrd XML...
Last Update: 1433871327
Start processing Round Robin DB
CF : AVERAGE
Pdp x Row : 1
Start processing DB rows
Finished processing DB rows
Start processing DB rows
Finished processing DB rows
Start processing Round Robin DB
CF : AVERAGE
Pdp x Row : 1
Start processing DB rows
Finished processing DB rows
Start processing DB rows
Finished processing DB rows
Start processing Round Robin DB
CF : AVERAGE
Pdp x Row : 6
Start processing DB rows
Finished processing DB rows
Start processing Round Robin DB
CF : AVERAGE
Pdp x Row : 24
Start processing DB rows
Finished processing DB rows
Start processing Round Robin DB
CF : AVERAGE
Pdp x Row : 288
Start processing DB rows
Finished processing DB rows
Start processing Round Robin DB
CF : MAX
Pdp x Row : 1
Start processing DB rows
Finished processing DB rows
Start processing DB rows
Finished processing DB rows
Start processing Round Robin DB
CF : MAX
Pdp x Row : 1
Start processing DB rows
Finished processing DB rows
Start processing DB rows
Finished processing DB rows
Start processing Round Robin DB
CF : MAX
Pdp x Row : 6
Start processing DB rows
Finished processing DB rows
Start processing Round Robin DB
CF : MAX
Pdp x Row : 24
Start processing DB rows
Finished processing DB rows
Start processing Round Robin DB
CF : MAX
Pdp x Row : 288
Start processing DB rows
Finished processing DB rows
Start processing header
DB Service Name: hdd_used
Finished updating header
...parsing completed
Outputing to
Restoring from XML to RRD:
ERROR: usage rrdtool restore [--range-check/-r] [--force-overwrite/-f] file.xml file.rrd
File clean up
Processing complete. It took 7 seconds
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.