[collectd] Wrong metric values

Chris Lajoie chris at ettaviation.com
Thu Jul 21 21:51:16 CEST 2016

Good thought... turns out the plugin works differently though, according to the Following Files section here: https://collectd.org/wiki/index.php/Plugin:Tail
At each interval it will read all lines up to the end of the already-opened file.

Still stuck on this... I really don't understand why it is sending me fractions instead of whole numbers. 

-----Original Message-----
From: Jacob Bisby [mailto:Jacob.Bisby at uniscope.com.au] 
Sent: Wednesday, July 20, 2016 8:55 PM
To: Chris Lajoie <chris at ettaviation.com>; collectd at verplant.org
Subject: RE: Wrong metric values

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"

    Instance "amavisd-RelayedOutbound"
    Regex "RelayedOutbound"
    DSType "CounterInc"
    Type "counter"

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

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?


collectd mailing list
collectd at verplant.org

More information about the collectd mailing list