You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.6 KiB

--- a/src/rrdtool.c
+++ b/src/rrdtool.c
@@ -61,6 +61,7 @@ typedef struct rrd_queue_s rrd_queue_t;
static const char *config_keys[] = {
"CacheTimeout", "CacheFlush", "CreateFilesAsync", "DataDir",
"StepSize", "HeartBeat", "RRARows", "RRATimespan",
+ "RRASingle",
"XFF", "WritesPerSecond", "RandomTimeout"};
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
@@ -78,6 +79,8 @@ static rrdcreate_config_t rrdcreate_conf
/* timespans = */ NULL,
/* timespans_num = */ 0,
+ /* rrasingle = */ 0,
+
/* consolidation_functions = */ NULL,
/* consolidation_functions_num = */ 0,
@@ -971,6 +974,12 @@ static int rrd_config(const char *key, c
/* compar = */ rrd_compare_numeric);
free(value_copy);
+ } else if (strcasecmp ("RRASingle", key) == 0) {
+ if (IS_TRUE (value))
+ {
+ rrdcreate_config.rrasingle = 1;
+ NOTICE ("rrdtool plugin: RRASingle = true: creating only AVERAGE RRAs");
+ }
} else if (strcasecmp("XFF", key) == 0) {
double tmp = atof(value);
if ((tmp < 0.0) || (tmp >= 1.0)) {
--- a/src/utils_rrdcreate.c
+++ b/src/utils_rrdcreate.c
@@ -180,6 +180,9 @@ static int rra_get(char ***ret, const va
rts_num = rra_timespans_num;
}
+ if (cfg->rrasingle)
+ rra_types_num = 1;
+
rra_max = rts_num * rra_types_num;
assert(rra_max > 0);
--- a/src/utils_rrdcreate.h
+++ b/src/utils_rrdcreate.h
@@ -40,6 +40,8 @@ struct rrdcreate_config_s {
int *timespans;
size_t timespans_num;
+ int rrasingle;
+
char **consolidation_functions;
size_t consolidation_functions_num;