[collectd] Wrong metric values
Chris Lajoie
chris at ettaviation.com
Thu Jul 21 04:45:55 CEST 2016
Hi, I have been using collectd successfully for some time with the standard plugins like cpu, memory, etc.
I just started trying to use the tail plugin to gather stats from postfix log output. The problem I am seeing is that the metrics outputted (to graphite in my case) are too small - nowhere even close to what they should be. Here is part of my config for the tail plugin
<Plugin "tail">
<File "/var/log/maillog">
Instance "postfix"
<Match>
Instance "amavisd-RelayedOutbound"
Regex "RelayedOutbound"
DSType "CounterInc"
Type "counter"
</Match>
</File>
</Plugin>
This should increment the counter each time it sees "RelayedOutbound" in the log file.
If I count the occurrences of RelayedOutbound in a 1-minute segment of the log file I get something like this:
[chris at ett1 ~]# cat /var/log/maillog | grep 2016-07-20T20:14 | grep RelayedOutbound | wc -l
47
The interval in collectd is set to 30 seconds, so during this 1 minute period, I think I should have got 2 values from collectd that are around 20-25ish. Instead, the 2 values I got from collectd are:
2016-07-20 20:14:10 1.200543
2016-07-20 20:14:40 0.866675
These numbers shouldn't even be fractions.. I would have thought I'd get whole numbers only.
Is this a bug?
-Chris
More information about the collectd
mailing list