[collectd] Wrong metric values

Jacob Bisby Jacob.Bisby at uniscope.com.au
Thu Jul 21 04:54:51 CEST 2016


I've not used the tail plugin before, but assuming it's similar to the bash command - with that long a polling interval, is it definitely tailing enough lines in the log to pick up all the expected data at each interval?

- Jacob Bisby


-----Original Message-----
From: collectd [mailto:collectd-bounces at verplant.org] On Behalf Of Chris Lajoie
Sent: Thursday, 21 July 2016 10:46 AM
To: collectd at verplant.org
Subject: [collectd] Wrong metric values

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


_______________________________________________
collectd mailing list
collectd at verplant.org
https://mailman.verplant.org/listinfo/collectd



More information about the collectd mailing list