Code

Imported upstream version 1.3rc9.
[pkg-rrdtool.git] / doc / rrdcreate.1
index b18228fe834564cb1fde37d5e2db75838a886f81..53fc8d98c073cdbf48cd0d603e26bdf77ab3ed10 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "RRDCREATE 1"
-.TH RRDCREATE 1 "2007-11-20" "1.2.26" "rrdtool"
+.TH RRDCREATE 1 "2008-05-12" "1.3rc9" "rrdtool"
 .SH "NAME"
 rrdcreate \- Set up a new Round Robin Database
 .SH "SYNOPSIS"
@@ -288,7 +288,29 @@ data point\fR.
 The data is also processed with the consolidation function (\fI\s-1CF\s0\fR) of
 the archive. There are several consolidation functions that
 consolidate primary data points via an aggregate function: \fB\s-1AVERAGE\s0\fR,
-\&\fB\s-1MIN\s0\fR, \fB\s-1MAX\s0\fR, \fB\s-1LAST\s0\fR. The format of \fB\s-1RRA\s0\fR line for these
+\&\fB\s-1MIN\s0\fR, \fB\s-1MAX\s0\fR, \fB\s-1LAST\s0\fR. 
+.RS 8
+.IP "\s-1AVERAGE\s0" 4
+.IX Item "AVERAGE"
+the average of the data points is stored.
+.IP "\s-1MIN\s0" 4
+.IX Item "MIN"
+the smallest of the data points is stored.
+.IP "\s-1MAX\s0" 4
+.IX Item "MAX"
+the largest of the data points is stored.
+.IP "\s-1LAST\s0" 4
+.IX Item "LAST"
+the last data points is used.
+.RE
+.RS 8
+.Sp
+Note that data aggregation inevitably leads to loss of precision and
+information. The trick is to pick the aggregate function such that the
+\&\fIinteresting\fR properties of your data is kept across the aggregation
+process.
+.Sp
+The format of \fB\s-1RRA\s0\fR line for these
 consolidation functions is:
 .Sp
 \&\fB\s-1RRA:\s0\fR\fI\s-1AVERAGE\s0 | \s-1MIN\s0 | \s-1MAX\s0 | \s-1LAST\s0\fR\fB:\fR\fIxff\fR\fB:\fR\fIsteps\fR\fB:\fR\fIrows\fR
@@ -302,6 +324,7 @@ to the number of PDPs in the interval. Thus, it ranges from 0 to 1 (exclusive).
 a \fIconsolidated data point\fR which then goes into the archive.
 .Sp
 \&\fIrows\fR defines how many generations of data values are kept in an \fB\s-1RRA\s0\fR.
+.RE
 .SH "Aberrant Behavior Detection with Holt-Winters Forecasting"
 .IX Header "Aberrant Behavior Detection with Holt-Winters Forecasting"
 In addition to the aggregate functions, there are a set of specialized
@@ -311,9 +334,11 @@ flagging aberrant behavior in the data source time series:
 .IP "\(bu" 4
 \&\fB\s-1RRA:\s0\fR\fI\s-1HWPREDICT\s0\fR\fB:\fR\fIrows\fR\fB:\fR\fIalpha\fR\fB:\fR\fIbeta\fR\fB:\fR\fIseasonal period\fR[\fB:\fR\fIrra-num\fR]
 .IP "\(bu" 4
-\&\fB\s-1RRA:\s0\fR\fI\s-1SEASONAL\s0\fR\fB:\fR\fIseasonal period\fR\fB:\fR\fIgamma\fR\fB:\fR\fIrra-num\fR
+\&\fB\s-1RRA:\s0\fR\fI\s-1MHWPREDICT\s0\fR\fB:\fR\fIrows\fR\fB:\fR\fIalpha\fR\fB:\fR\fIbeta\fR\fB:\fR\fIseasonal period\fR[\fB:\fR\fIrra-num\fR]
+.IP "\(bu" 4
+\&\fB\s-1RRA:\s0\fR\fI\s-1SEASONAL\s0\fR\fB:\fR\fIseasonal period\fR\fB:\fR\fIgamma\fR\fB:\fR\fIrra-num\fR[\fB:smoothing\-window=\fR\fIfraction\fR]
 .IP "\(bu" 4
-\&\fB\s-1RRA:\s0\fR\fI\s-1DEVSEASONAL\s0\fR\fB:\fR\fIseasonal period\fR\fB:\fR\fIgamma\fR\fB:\fR\fIrra-num\fR
+\&\fB\s-1RRA:\s0\fR\fI\s-1DEVSEASONAL\s0\fR\fB:\fR\fIseasonal period\fR\fB:\fR\fIgamma\fR\fB:\fR\fIrra-num\fR[\fB:smoothing\-window=\fR\fIfraction\fR]
 .IP "\(bu" 4
 \&\fB\s-1RRA:\s0\fR\fI\s-1DEVPREDICT\s0\fR\fB:\fR\fIrows\fR\fB:\fR\fIrra-num\fR
 .IP "\(bu" 4
@@ -322,19 +347,32 @@ flagging aberrant behavior in the data source time series:
 These \fBRRAs\fR differ from the true consolidation functions in several ways.
 First, each of the \fB\s-1RRA\s0\fRs is updated once for every primary data point.
 Second, these \fBRRAs\fR are interdependent. To generate real-time confidence
-bounds, a matched set of \s-1HWPREDICT\s0, \s-1SEASONAL\s0, \s-1DEVSEASONAL\s0, and
-\&\s-1DEVPREDICT\s0 must exist. Generating smoothed values of the primary data points
-requires both a \s-1HWPREDICT\s0 \fB\s-1RRA\s0\fR and \s-1SEASONAL\s0 \fB\s-1RRA\s0\fR. Aberrant behavior
-detection requires \s-1FAILURES\s0, \s-1HWPREDICT\s0, \s-1DEVSEASONAL\s0, and \s-1SEASONAL\s0.
-.PP
-The actual predicted, or smoothed, values are stored in the \s-1HWPREDICT\s0
-\&\fB\s-1RRA\s0\fR. The predicted deviations are stored in \s-1DEVPREDICT\s0 (think a standard
-deviation which can be scaled to yield a confidence band). The \s-1FAILURES\s0
-\&\fB\s-1RRA\s0\fR stores binary indicators. A 1 marks the indexed observation as
-failure; that is, the number of confidence bounds violations in the
-preceding window of observations met or exceeded a specified threshold. An
-example of using these \fBRRAs\fR to graph confidence bounds and failures
-appears in rrdgraph.
+bounds, a matched set of \s-1SEASONAL\s0, \s-1DEVSEASONAL\s0, \s-1DEVPREDICT\s0, and either
+\&\s-1HWPREDICT\s0 or \s-1MHWPREDICT\s0 must exist. Generating smoothed values of the primary
+data points requires a \s-1SEASONAL\s0 \fB\s-1RRA\s0\fR and either an \s-1HWPREDICT\s0 or \s-1MHWPREDICT\s0 
+\&\fB\s-1RRA\s0\fR. Aberrant behavior detection requires \s-1FAILURES\s0, \s-1DEVSEASONAL\s0, \s-1SEASONAL\s0,
+and either \s-1HWPREDICT\s0 or \s-1MHWPREDICT\s0.
+.PP
+The predicted, or smoothed, values are stored in the \s-1HWPREDICT\s0 or \s-1MHWPREDICT\s0
+\&\fB\s-1RRA\s0\fR. \s-1HWPREDICT\s0 and \s-1MHWPREDICT\s0 are actually two variations on the
+Holt-Winters method. They are interchangeable. Both attempt to decompose data
+into three components: a baseline, a trend, and a seasonal coefficient.
+\&\s-1HWPREDICT\s0 adds its seasonal coefficient to the baseline to form a prediction, whereas
+\&\s-1MHWPREDICT\s0 multiplies its seasonal coefficient by the baseline to form a
+prediction. The difference is noticeable when the baseline changes
+significantly in the course of a season; \s-1HWPREDICT\s0 will predict the seasonality
+to stay constant as the baseline changes, but \s-1MHWPREDICT\s0 will predict the
+seasonality to grow or shrink in proportion to the baseline. The proper choice
+of method depends on the thing being modeled. For simplicity, the rest of this
+discussion will refer to \s-1HWPREDICT\s0, but \s-1MHWPREDICT\s0 may be substituted in its
+place.
+.PP
+The predicted deviations are stored in \s-1DEVPREDICT\s0 (think a standard deviation
+which can be scaled to yield a confidence band). The \s-1FAILURES\s0 \fB\s-1RRA\s0\fR stores 
+binary indicators. A 1 marks the indexed observation as failure; that is, the 
+number of confidence bounds violations in the preceding window of observations 
+met or exceeded a specified threshold. An example of using these \fBRRAs\fR to graph 
+confidence bounds and failures appears in rrdgraph.
 .PP
 The \s-1SEASONAL\s0 and \s-1DEVSEASONAL\s0 \fBRRAs\fR store the seasonal coefficients for the
 Holt-Winters forecasting algorithm and the seasonal deviations, respectively.
@@ -394,6 +432,13 @@ If \s-1SEASONAL\s0 and \s-1DEVSEASONAL\s0 \fBRRAs\fR are created explicitly, \fI
 be the same for both. Note that \fIgamma\fR can also be changed via the
 \&\fBRRDtool\fR \fItune\fR command.
 .PP
+\&\fIsmoothing-window\fR specifies the fraction of a season that should be
+averaged around each point. By default, the value of \fIsmoothing-window\fR is
+0.05, which means each value in \s-1SEASONAL\s0 and \s-1DEVSEASONAL\s0 will be occasionally
+replaced by averaging it with its (\fIseasonal period\fR*0.05) nearest neighbors.
+Setting \fIsmoothing-window\fR to zero will disable the running-average smoother
+altogether.
+.PP
 \&\fIrra-num\fR provides the links between related \fBRRAs\fR. If \s-1HWPREDICT\s0 is
 specified alone and the other \fBRRAs\fR are created implicitly, then
 there is no need to worry about this argument. If \fBRRAs\fR are created
@@ -429,28 +474,24 @@ Here is an explanation by Don Baarda on the inner workings of RRDtool.
 It may help you to sort out why all this *UNKNOWN* data is popping
 up in your databases:
 .PP
-RRDtool gets fed samples at arbitrary times. From these it builds Primary
-Data Points (PDPs) at exact times on every \*(L"step\*(R" interval. The PDPs are
-then accumulated into RRAs.
+RRDtool gets fed samples/updates at arbitrary times. From these it builds Primary
+Data Points (PDPs) on every \*(L"step\*(R" interval. The PDPs are
+then accumulated into the RRAs.
 .PP
 The \*(L"heartbeat\*(R" defines the maximum acceptable interval between
-samples. If the interval between samples is less than \*(L"heartbeat\*(R",
+samples/updates. If the interval between samples is less than \*(L"heartbeat\*(R",
 then an average rate is calculated and applied for that interval. If
 the interval between samples is longer than \*(L"heartbeat\*(R", then that
 entire interval is considered \*(L"unknown\*(R". Note that there are other
 things that can make a sample interval \*(L"unknown\*(R", such as the rate
-exceeding limits, or even an \*(L"unknown\*(R" input sample.
+exceeding limits, or a sample that was explicitly marked as unknown.
 .PP
 The known rates during a \s-1PDP\s0's \*(L"step\*(R" interval are used to calculate
-an average rate for that \s-1PDP\s0. Also, if the total \*(L"unknown\*(R" time during
-the \*(L"step\*(R" interval exceeds the \*(L"heartbeat\*(R", the entire \s-1PDP\s0 is marked
+an average rate for that \s-1PDP\s0. If the total \*(L"unknown\*(R" time accounts for
+more than \fBhalf\fR the \*(L"step\*(R", the entire \s-1PDP\s0 is marked
 as \*(L"unknown\*(R". This means that a mixture of known and \*(L"unknown\*(R" sample
-times in a single \s-1PDP\s0 \*(L"step\*(R" may or may not add up to enough \*(L"unknown\*(R"
-time to exceed \*(L"heartbeat\*(R" and hence mark the whole \s-1PDP\s0 \*(L"unknown\*(R". So
-\&\*(L"heartbeat\*(R" is not only the maximum acceptable interval between
-samples, but also the maximum acceptable amount of \*(L"unknown\*(R" time per
-\&\s-1PDP\s0 (obviously this is only significant if you have \*(L"heartbeat\*(R" less
-than \*(L"step\*(R").
+times in a single \s-1PDP\s0 \*(L"step\*(R" may or may not add up to enough \*(L"known\*(R"
+time to warrent for a known \s-1PDP\s0.
 .PP
 The \*(L"heartbeat\*(R" can be short (unusual) or long (typical) relative to
 the \*(L"step\*(R" interval between PDPs. A short \*(L"heartbeat\*(R" means you
@@ -483,7 +524,7 @@ same average rate. \fI\-\- Don Baarda <don.baarda@baesystems.com>\fR
 \&       u|15|/     "swt" expired
 \&       u|16|
 \&        |17|\-\-\-\-* sample4, restart "hb", create "pdp" for step1 = 
-\&        |18|   /  = unknown due to 10 "u" labled secs > "hb"
+\&        |18|   /  = unknown due to 10 "u" labled secs > 0.5 * step
 \&        |19|  /
 \&        |20| /
 \&        |21|\-\-\-\-* sample5, restart "hb"