# When enabled, some internal statistics are recorded as values #
# Disabled by default. #
#----------------------------------------------------------------------------#
-#InternalStatistics false
+#CollectInternalStats false
#----------------------------------------------------------------------------#
# Interval at which to query values. This may be overwritten on a per-plugin #
the I<Threshold> configuration to dispatch notifications about missing values,
see L<collectd-threshold(5)> for details.
-=item B<InternalStatistics> I<true|false>
+=item B<CollectInternalStats> I<true|false>
Some internal statistics can be recorded to monitor Collectd itself.
Default value : false.
{"WriteQueueLimitLow", NULL, NULL},
{"Timeout", NULL, "2"},
{"AutoLoadPlugin", NULL, "false"},
- {"InternalStatistics", NULL, "false"},
+ {"CollectInternalStats", NULL, "false"},
{"PreCacheChain", NULL, "PreCache"},
{"PostCacheChain", NULL, "PostCache"}
};
vl.values_len = 2;
vl.time = 0;
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
- sstrncpy (vl.plugin, "internal", sizeof (vl.plugin));
+ sstrncpy (vl.plugin, "collectd", sizeof (vl.plugin));
vl.type_instance[0] = 0;
vl.values_len = 1;
/* Init the value cache */
uc_init ();
- if (IS_TRUE (global_option_get ("InternalStatistics")))
+ if (IS_TRUE (global_option_get ("CollectInternalStats")))
record_statistics = 1;
chain_name = global_option_get ("PreCacheChain");
static pthread_mutex_t statistics_lock = PTHREAD_MUTEX_INITIALIZER;
if (check_drop_value ()) {
- pthread_mutex_lock(&statistics_lock);
- stats_values_dropped++;
- pthread_mutex_unlock(&statistics_lock);
+ if(record_statistics) {
+ pthread_mutex_lock(&statistics_lock);
+ stats_values_dropped++;
+ pthread_mutex_unlock(&statistics_lock);
+ }
return (0);
}