[collectd] Any way to get Real Counter ( not rate) in tail plugin?

Jan Kundrát jkt at flaska.net
Mon Jun 23 11:17:39 CEST 2014

On Monday, 23 June 2014 10:49:17 CEST, Toni Moreno wrote:
> and I count 30 matches on a period  ( and period time was 1 minute)
> Value returned will be 0.5 .
> What config should I write  to get directly the Integer "30" ??

I know what you mean here, I've spent a couple of hours debugging the same 
problem a few weeks ago. Of course everything is well documented, but in 
the end, the key point is that the tail plugin is designed to either:

a) Somehow extract a value as-is in the file and store it without further 
processing as Gauge. These are the Gauge* options.

b) Do some fancy processing like counting the number of lines matching a 
given pattern, or keep adding all the extracted numbers, but then you 
cannot set the result to the type Gauge anymore.

In your case, you've told collectd to track the rate of the traffic, i.e. 
how many bytes per minute are being processed. The correct value *is* 0.5. 
The intuitive behavior of getting back "30" as the raw value is, AFAIK, not 

The current behavior also makes certain amount of sense -- if you are 
looking at some aggregated graphs, you might be interested in "how much 
traffic went through my system". Tracking the rate makes sense here, but it 
indeed takes some time getting used to it.

It was especially confusing when I was plotting the number of API calls 
towards an OpenStack endpoint. In the end I at least configured the 
collectd-web to add a line saying "Total: 123 requests" to the bottom of 
the graph.

With kind regards,

[1] https://collectd.org/wiki/index.php/Data_source

Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/

More information about the collectd mailing list