/*****************************************************************************
- * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007
+ * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010
*****************************************************************************
* rrd_format.h RRD Database Format header
*****************************************************************************/
#ifndef _RRD_FORMAT_H
#define _RRD_FORMAT_H
+/*
+ * _RRD_TOOL_H
+ * We're building RRDTool itself.
+ *
+ * RRD_EXPORT_DEPRECATED
+ * User is requesting internal function which need this struct. They have
+ * been told that this will change and have agreed to adapt their programs.
+ */
+#if !defined(_RRD_TOOL_H) && !defined(RRD_EXPORT_DEPRECATED)
+# error "Do not include rrd_format.h directly. Include rrd.h instead!"
+#endif
+
#include "rrd.h"
/*****************************************************************************
#define RRD_VERSION3 "0003"
#define FLOAT_COOKIE 8.642135E130
-#include "rrd_nan_inf.h"
-
typedef union unival {
unsigned long u_cnt;
rrd_value_t u_val;
CF_MAXIMUM,
CF_LAST,
CF_HWPREDICT,
- CF_MHWPREDICT,
/* An array of predictions using the seasonal
* Holt-Winters algorithm. Requires an RRA of type
* CF_SEASONAL for this data source. */
/* An array of smoothed seasonal deviations. Requires
* an RRA of type CF_HWPREDICT for this data source.
* */
- CF_FAILURES
+ CF_FAILURES,
+ /* HWPREDICT that follows a moving baseline */
+ CF_MHWPREDICT
+ /* new entries must come last !!! */
};
/* A binary array of failure indicators: 1 indicates
enum rra_par_en { RRA_cdp_xff_val = 0, /* what part of the consolidated
* datapoint must be known, to produce a
* valid entry in the rra */
- RRA_hw_alpha,
+ /* CF_HWPREDICT: */
+ RRA_hw_alpha = 1,
/* exponential smoothing parameter for the intercept in
* the Holt-Winters prediction algorithm. */
- RRA_hw_beta,
+ RRA_hw_beta = 2,
/* exponential smoothing parameter for the slope in
* the Holt-Winters prediction algorithm. */
- RRA_dependent_rra_idx,
+
+ RRA_dependent_rra_idx = 3,
/* For CF_HWPREDICT: index of the RRA with the seasonal
* effects of the Holt-Winters algorithm (of type
* CF_SEASONAL).
* Holt-Winters prediction (of type CF_HWPREDICT).
* For CF_FAILURES: index of the CF_DEVSEASONAL array.
* */
- RRA_seasonal_smooth_idx,
- /* For CF_SEASONAL and CF_DEVSEASONAL:
- * an integer between 0 and row_count - 1 which
+
+ /* CF_SEASONAL and CF_DEVSEASONAL: */
+ RRA_seasonal_gamma = 1,
+ /* exponential smoothing parameter for seasonal effects. */
+
+ RRA_seasonal_smoothing_window = 2,
+ /* fraction of the season to include in the running average
+ * smoother */
+
+ /* RRA_dependent_rra_idx = 3, */
+
+ RRA_seasonal_smooth_idx = 4,
+ /* an integer between 0 and row_count - 1 which
* is index in the seasonal cycle for applying
* the period smoother. */
- RRA_failure_threshold,
+
+ /* CF_FAILURES: */
+ RRA_delta_pos = 1, /* confidence bound scaling parameters */
+ RRA_delta_neg = 2,
+ /* RRA_dependent_rra_idx = 3, */
+ RRA_window_len = 4,
+ RRA_failure_threshold = 5
/* For CF_FAILURES, number of violations within the last
* window required to mark a failure. */
- RRA_seasonal_gamma = RRA_hw_alpha,
- /* exponential smoothing parameter for seasonal effects.
- * */
- RRA_delta_pos = RRA_hw_alpha,
- RRA_delta_neg = RRA_hw_beta,
- /* confidence bound scaling parameters for the
- * the FAILURES RRA. */
- RRA_window_len = RRA_seasonal_smooth_idx
};
/* For CF_FAILURES, the length of the window for measuring
stat_head_t *stat_head; /* the static header */
ds_def_t *ds_def; /* list of data source definitions */
rra_def_t *rra_def; /* list of round robin archive def */
- live_head_t *live_head;
+ live_head_t *live_head; /* rrd v >= 3 last_up with us */
+ time_t *legacy_last_up; /* rrd v < 3 last_up time */
pdp_prep_t *pdp_prep; /* pdp data prep area */
cdp_prep_t *cdp_prep; /* cdp prep area */
rra_ptr_t *rra_ptr; /* list of rra pointers */