RRDTUNE(1) | rrdtool | RRDTUNE(1) |
rrdtune - Modify some basic properties of a Round Robin Database
rrdtool tune filename [--heartbeat|-h ds-name:heartbeat] [--minimum|-i ds-name:min] [--maximum|-a ds-name:max] [--data-source-type|-d ds-name:DST] [--data-source-rename|-r old-name:new-name] [--deltapos|-p scale-value] [--deltaneg|-n scale-value] [--failure-threshold|-f failure-threshold] [--window-length|-w window-length] [--alpha|-x adaption-parameter] [--beta|-y adaption-parameter] [--gamma|-z adaption-parameter] [--gamma-deviation|-v adaption-parameter] [--smoothing-window|-s fraction-of-season] [--smoothing-window-deviation|-S fraction-of-season] [--aberrant-reset|-b ds-name] [--step|-t newstep] [--daemon|-D address] [DEL:ds-name] [DS:ds-spec] [DELRRA:index] [RRA:rra-spec] [RRA#index:[+-=]<number]>
The tune option allows you to alter some of the basic configuration values stored in the header area of a Round Robin Database (RRD).
One application of the tune function is to relax the validation rules on an RRD. This allows you to fill a new RRD with data available in larger intervals than what you would normally want to permit. Be very careful with tune operations for COMPUTE data sources. Setting the min, max, and heartbeat for a COMPUTE data source without changing the data source type to a non-COMPUTE DST WILL corrupt the data source header in the RRD.
A second application of the tune function is to set or alter parameters used by the specialized function RRAs for aberrant behavior detection.
Still another application is to add or remove data sources (DS) or add / remove or alter some aspects of round-robin archives (RRA). These operations are not really done in-place, but rather generate a new RRD file internally and move it over the original file. Data is kept intact during these operations. For even more in-depth modifications you may review the --source and --template options of the create function which allow you to combine multiple RRD files into a new one and which is even more clever in what data it is able to keep or "regenerate".
Due to the implementation of this option, there is an indirect impact on other data sources in the RRD. A smoothing algorithm is applied to SEASONAL and DEVSEASONAL values on a periodic basis. During bootstrap initialization this smoothing is deferred. For efficiency, the implementation of smoothing is not data source specific. This means that utilizing reset for one data source will delay running the smoothing algorithm for all data sources in the file. This is unlikely to have serious consequences, unless the data being collected for the non-reset data sources is unusually volatile during the reinitialization period of the reset data source.
Use of this tuning option is advised when the behavior of the data source time series changes in a drastic and permanent manner.
TODO: add proper documentation
If given, RRDtool will try to connect to the caching daemon rrdcached at address and will fail if the connection cannot be established. If the connection is successfully established the data for the filename will be flushed before performing the copy/modify operation. Afterwards the filename will be forgotten by the cache daemon, so that the next access using the caching daemon will read the proper structure.
This sequence of operations is designed to achieve a consistent overall result with respect to RRD internal file consistency when using one of the DS or RRA changing operations (that is: the resulting file should always be a valid RRD file, regardless of concurrent updates through the caching daemon). Regarding data consistency such guarantees are not made: Without external synchronization concurrent updates may be lost.
For a list of accepted formats, see the -l option in the rrdcached manual.
"rrdtool tune data.rrd -h in:100000 -h out:100000 -h through:100000"
Set the minimum required heartbeat for data sources 'in', 'out' and 'through' to 100'000 seconds which is a little over one day in data.rrd. This would allow to feed old data from MRTG-2.0 right into RRDtool without generating *UNKNOWN* entries.
"rrdtool tune monitor.rrd --window-length 5 --failure-threshold 3"
If the FAILURES RRA is implicitly created, the default window-length is 9 and the default failure-threshold is 7. This command now defines a failure as 3 or more violations in a temporal window of 5 time points.
"rrdtool tune some.rrd DEL:a RRA#0:+10"
Delete the data source named a and extend the very first archive by 10 rows. This will in fact replace the input RRD with a new RRD keeping all existing data. For most practical use cases this is identical to a real in-place modification.
Tobias Oetiker <tobi@oetiker.ch>, Peter Stamfest <peter@stamfest.at>
2024-03-31 | 1.7.2 |