[collectd] traffic plugin overflow

Florian Forster octo at verplant.org
Thu May 25 10:51:44 CEST 2006

Hi Daniel,

On Wed, May 24, 2006 at 01:01:37PM +0200, Daniel Poelzleithner wrote:
> The problem is, that traffic plugin seems to overflow when the openvpn
> server is restarted, the tap0 device goes down and later up again.
> Causing to generate a peak of traffic of many hundert or thousands of
> megabytes and making the statistic useless.

I assume the counters are reset when the interface goes down. This will
cause RRDTool to detect an counter-overflow and it will act accordingly.
The way to get around this is to set a maximum value, which will filter
out (most) peaks. Please keep in mind that the values stored in the RRD-
files are _bytes_ per second, not bits per second. Since the thearetical
maximum is never reached in reality setting this speed as maximum works
fine in most scenarios.

If you have a more or less fixed number of interfaces to monitor you can
use `rrdtool tune' (see `rrdtune(1)'). The example assumes a gigabit
ethernet (GE) link:
  ls */traffic-*.rrd | while read FILE
    rrdtool tune "$FILE" \
      --maximum incoming:125000000 \
      --maximum outgoing:125000000

If the number of interfaces varies and often new RRD-files are created,
you should set this limit in the sources. It's located in
`src/traffic.c', line 62 and 63 (versions 3.9.*):
With (using the GE example again):

Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20060525/2bf8923f/attachment.pgp

More information about the collectd mailing list