Skip to content

edgenative/rrd_step_reduce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

rrd_step_reduce

Change the interval of an RRD file after its created. This was originally found on a blog over at elturista.net, but that domain seems to be with someone else now, so the blog is gone. Version here for safe keeping.

Usage

Dump your raw data into an XML file, using rrdtool dump

rrdtool dump file.rrd > file.15min.xml

Next, generate raw data with the new time interval. Specify the time reduction factor on the command line, in this example, I want a 5 min sample rate after originally having 15 mins. So using a factor of 3 gives the right output.

./rrd_step_reduce.py file.15min.xml 3 > file.5min.xml

Backup your old file and remove it. Then run rrdtool restore, to re-create an rrd file from your new xml data.

rrdtool restore file.5min.xml file.rrd

Modify the system you were using to generate the rrd data.

Profit.

About

Change the interval of an RRD file after its created

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages