collectd: add mod-memory (patch from #5591)
[openwrt/svn-archive/archive.git] / utils / collectd / patches / 100-rrdtool-add-rrasingle-option.patch
1 --- a/src/rrdtool.c
2 +++ b/src/rrdtool.c
3 @@ -87,6 +87,7 @@ static const char *config_keys[] =
4 "HeartBeat",
5 "RRARows",
6 "RRATimespan",
7 + "RRASingle",
8 "XFF"
9 };
10 static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);
11 @@ -1077,6 +1078,14 @@ static int rrd_config (const char *key,
12 }
13 xff = tmp;
14 }
15 + else if (strcasecmp ("RRASingle", key) == 0)
16 + {
17 + if (strcasecmp("true", value) == 0)
18 + {
19 + rra_types_num = 1;
20 + NOTICE ("rrdtool plugin: RRASingle = true: creating only AVERAGE RRAs");
21 + }
22 + }
23 else
24 {
25 return (-1);