There are two popular variants of the Holt-Winters forecasting method; RRDtool
[rrdtool.git] / doc / rrdtune.pod
1 =head1 NAME
2
3 rrdtune - Modify some basic properties of a Round Robin Database
4
5 =head1 SYNOPSIS
6
7 B<rrdtool> B<tune> I<filename>
8 S<[B<--heartbeat>|B<-h> I<ds-name>:I<heartbeat>]>
9 S<[B<--minimum>|B<-i> I<ds-name>:I<min>]>
10 S<[B<--maximum>|B<-a> I<ds-name>:I<max>]>
11 S<[B<--data-source-type>|B<-d> I<ds-name>:I<DST>]>
12 S<[B<--data-source-rename>|B<-r> I<old-name>:I<new-name>]>
13 S<[B<--deltapos> I<scale-value>]>
14 S<[B<--deltaneg> I<scale-value>]>
15 S<[B<--failure-threshold> I<failure-threshold>]>
16 S<[B<--window-length> I<window-length>]>
17 S<[B<--alpha> I<adaption-parameter>]>
18 S<[B<--beta> I<adaption-parameter>]>
19 S<[B<--gamma> I<adaption-parameter>]>
20 S<[B<--gamma-deviation> I<adaption-parameter>]>
21 S<[B<--aberrant-reset> I<ds-name>]>
22
23 =head1 DESCRIPTION
24
25 The tune option allows you to alter some of the basic configuration
26 values stored in the header area of a Round Robin Database (B<RRD>).
27
28 One application of the B<tune> function is to relax the
29 validation rules on an B<RRD>. This allows to fill a new B<RRD> with
30 data available in larger intervals than what you would normally want
31 to permit. Be very careful with tune operations for COMPUTE data sources.
32 Setting the I<min>, I<max>, and  I<heartbeat> for a COMPUTE data source
33 without changing the data source type to a non-COMPUTE B<DST> WILL corrupt
34 the data source header in the B<RRD>.
35
36 A second application of the B<tune> function is to set or alter parameters
37 used by the specialized function B<RRAs> for aberrant behavior detection.
38
39 =over 8
40
41 =item I<filename>
42
43 The name of the B<RRD> you want to tune.
44
45 =item S<B<--heartbeat>|B<-h> I<ds-name>:I<heartbeat>>
46
47 modify the I<heartbeat> of a data source. By setting this to a high
48 value the RRD will accept things like one value per day.
49
50 =item S<B<--minimum>|B<-i> I<ds-name>:I<min>>
51
52 alter the minimum value acceptable as input from the data source.
53 Setting I<min> to 'U' will disable this limit.
54
55 =item S<B<--maximum>|B<-a> I<ds-name>:I<max>>
56
57 alter the maximum value acceptable as input from the data source.
58 Setting I<max> to 'U' will disable this limit.
59
60 =item S<B<--data-source-type>|B<-d> I<ds-name>:I<DST>>
61
62 alter the type B<DST> of a data source.
63
64 =item S<B<--data-source-rename>|B<-r> I<old-name>:I<new-name>>
65
66 rename a data source.
67
68 =item S<B<--deltapos> I<scale-value>>
69
70 Alter the deviation scaling factor for the upper bound of the
71 confidence band used internally to calculate violations for the
72 FAILURES B<RRA>. The default value is 2. Note that this parameter is
73 not related to graphing confidence bounds which must be specified as a
74 CDEF argument to generate a graph with confidence bounds. The graph
75 scale factor need not to agree with the value used internally by the
76 FAILURES B<RRA>.
77
78 =item S<B<--deltaneg> I<scale-value>>
79
80 Alter the deviation scaling factor for the lower bound of the confidence band
81 used internally to calculate violations for the FAILURES B<RRA>. The default
82 value is 2. As with B<--deltapos>, this argument is unrelated to the scale
83 factor chosen when graphing confidence bounds.
84
85 =item S<B<--failure-threshold> I<failure-threshold>>
86
87 Alter the number of confidence bound violations that constitute a failure for
88 purposes of the FAILURES B<RRA>. This must be an integer less than or equal to
89 the window length of the FAILURES B<RRA>. This restriction is not verified by
90 the tune option, so one can reset failure-threshold and window-length
91 simultaneously. Setting this option will reset the count of violations to 0.
92
93 =item S<B<--window-length> I<window-length>>
94
95 Alter the number of time points in the temporal window for determining
96 failures. This must be an integer greater than or equal to the window
97 length of the FAILURES B<RRA> and less than or equal to 28. Setting
98 this option will reset the count of violations to 0.
99
100 =item S<B<--alpha> I<adaption-parameter>>
101
102 Alter the intercept adaptation parameter for the Holt-Winters
103 forecasting algorithm. This parameter must be between 0 and 1.
104
105 =item S<B<--beta> I<adaption-parameter>>
106
107 Alter the slope adaptation parameter for the Holt-Winters forecasting
108 algorithm. This parameter must be between 0 and 1.
109
110 =item S<B<--gamma> I<adaption-parameter>>
111
112 Alter the seasonal coefficient adaptation parameter for the SEASONAL
113 B<RRA>. This parameter must be between 0 and 1.
114
115 =item S<B<--gamma-deviation> I<adaption-parameter>>
116
117 Alter the seasonal deviation adaptation parameter for the DEVSEASONAL
118 B<RRA>. This parameter must be between 0 and 1.
119
120 =item S<B<--aberrant-reset> I<ds-name>>
121
122 This option causes the aberrant behavior detection algorithm to reset
123 for the specified data source; that is, forget all it is has learnt so far.
124 Specifically, for the HWPREDICT or MHWPREDICT B<RRA>, it sets the intercept and
125 slope coefficients to unknown. For the SEASONAL B<RRA>, it sets all seasonal
126 coefficients to unknown. For the DEVSEASONAL B<RRA>, it sets all seasonal
127 deviation coefficients to unknown. For the FAILURES B<RRA>, it erases the
128 violation history. Note that reset does not erase past predictions
129 (the values of the HWPREDICT or MHWPREDICT B<RRA>), predicted deviations (the
130 values of the DEVPREDICT B<RRA>), or failure history (the values of the 
131 FAILURES B<RRA>).  This option will function even if not all the listed 
132 B<RRAs> are present.
133
134 Due to the implementation of this option, there is an indirect impact on
135 other data sources in the RRD. A smoothing algorithm is applied to
136 SEASONAL and DEVSEASONAL values on a periodic basis. During bootstrap
137 initialization this smoothing is deferred. For efficiency, the implementation
138 of smoothing is not data source specific. This means that utilizing
139 reset for one data source will delay running the smoothing algorithm
140 for all data sources in the file. This is unlikely to have serious
141 consequences, unless the data being collected for the non-reset data sources
142 is unusually volatile during the reinitialization period of the reset
143 data source.
144
145 Use of this tuning option is advised when the behavior of the data source
146 time series changes in a drastic and permanent manner.
147
148 =back
149
150 =head1 EXAMPLE 1
151
152 C<rrdtool tune data.rrd -h in:100000 -h out:100000 -h through:100000>
153
154 Set the minimum required heartbeat for data sources 'in', 'out'
155 and 'through' to 10'000 seconds which is a little over one day in data.rrd.
156 This would allow to feed old data from MRTG-2.0 right into
157 RRDtool without generating *UNKNOWN* entries.
158
159 =head1 EXAMPLE 2
160
161 C<rrdtool tune monitor.rrd --window-length 5 --failure-threshold 3>
162
163 If the FAILURES B<RRA> is implicitly created, the default
164 window-length is 9 and the default failure-threshold is 7. This
165 command now defines a failure as 3 or more violations in a temporal
166 window of 5 time points.
167
168 =head1 AUTHOR
169
170 Tobias Oetiker <tobi@oetiker.ch>
171