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:[email protected]] Sent: Wednesday, July 20, 2016 8:55 PM To: Chris Lajoie <[email protected]>; [email protected] 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:[email protected]] On Behalf Of Chris Lajoie Sent: Thursday, 21 July 2016 10:46 AM To: [email protected] 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@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 [email protected] https://mailman.verplant.org/listinfo/collectd _______________________________________________ collectd mailing list [email protected] https://mailman.verplant.org/listinfo/collectd
