[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
  do
    rrdtool tune "$FILE" \
      --maximum incoming:125000000 \
      --maximum outgoing:125000000
  done

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.*):
Replace:
  "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:U",
  "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:U",
With (using the GE example again):
  "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:125000000",
  "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:125000000",

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- 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