summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ee74dd2)
raw | patch | inline | side by side (parent: ee74dd2)
author | Florian Forster <octo@collectd.org> | |
Sat, 10 Nov 2012 09:08:35 +0000 (10:08 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 10 Nov 2012 09:08:35 +0000 (10:08 +0100) |
src/collectd.conf.pod | patch | blob | history | |
src/rrdcached.c | patch | blob | history |
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index 9a67068194121ed089e5d761c48294e2617b495f..d7aba7bce08fa2461a3af3481af2d2a441db26be 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
@@ -4233,6 +4233,12 @@ more then one RRA. If this option is never used, the built-in default of (3600,
For more information on how RRA-sizes are calculated see B<RRARows> above.
+=item B<XFF> I<Factor>
+
+Set the "XFiles Factor". The default is 0.1. If unsure, don't set this option.
+I<Factor> must be in the range C<[0.0-1.0)>, i.e. between zero (inclusive) and
+one (exclusive).
+
=back
=head2 Plugin C<rrdtool>
=item B<XFF> I<Factor>
Set the "XFiles Factor". The default is 0.1. If unsure, don't set this option.
+I<Factor> must be in the range C<[0.0-1.0)>, i.e. between zero (inclusive) and
+one (exclusive).
=item B<CacheFlush> I<Seconds>
diff --git a/src/rrdcached.c b/src/rrdcached.c
index 3731d01084eb5ee8a4137bb09ca361ccc6230635..8dd636c2f1987440159ad92f6c03cec30afcc754 100644 (file)
--- a/src/rrdcached.c
+++ b/src/rrdcached.c
return (0);
} /* int rc_config_get_int_positive */
+static int rc_config_get_xff (oconfig_item_t const *ci, double *ret)
+{
+ double value;
+
+ if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_NUMBER))
+ {
+ ERROR ("rrdcached plugin: The \"%s\" needs exactly one numeric argument "
+ "in the range [0.0, 1.0)", ci->key);
+ return (EINVAL);
+ }
+
+ value = ci->values[0].value.number;
+ if ((value => 0.0) && (value < 1.0))
+ {
+ *ret = value;
+ return (0);
+ }
+
+ ERROR ("rrdcached plugin: The \"%s\" needs exactly one numeric argument "
+ "in the range [0.0, 1.0)", ci->key);
+ return (EINVAL);
+} /* int rc_config_get_xff */
+
static int rc_config_add_timespan (int timespan)
{
int *tmp;
if (status == 0)
status = rc_config_add_timespan (tmp);
}
+ else if (strcasecmp ("XFF", key) == 0)
+ status = rc_config_get_xff (child, &rrdcreate_config.xff);
else
{
WARNING ("rrdcached plugin: Ignoring invalid option %s.", key);