Skip to content

interface plugin

Plugin name interface
Type read
Callbacks config, init, read
Status supported
Since 1.0
Copyright 2005–2008 Florian octo Forster, 2009 Manuel Sanmartin
License GPLv2
Configuration collectd.conf(5)

Description

The Interface plugin collects information about the traffic (octets per second), packets per second and errors of interfaces (of course number of errors during one second). If you're not interested in all interfaces but want to exclude some, or only collect information of some selected interfaces, you can select the “interesting” interfaces using the plugin's configuration.

Synopsis

 <Plugin "interface">
   Interface "lo"
   Interface "sit0"
   IgnoreSelected true
 </Plugin>

Example graphs

Plugin-traffic.png Plugin-traffic-if-packets.png Plugin-traffic-if-errors.png

Dependencies

  • Linux
    • /proc-file system
  • Solaris
    • kstat_read(3KSTAT)
  • Mac OS X / Dawin, possibly others
    • getifaddrs
  • AIX
    • libperfstat(3)
  • FreeBSD
    • none
  • Other

See also

Configuration

Configuration options · from collectd.conf(5)

See this section in the full configuration reference

Interface Interface

Select this interface. By default these interfaces will then be collected. For a more detailed description see IgnoreSelected below.

See /"IGNORELISTS" for details.

IgnoreSelected true|false

If no configuration is given, the interface-plugin will collect data from all interfaces. This may not be practical, especially for loopback- and similar interfaces. Thus, you can use the Interface-option to pick the interfaces you're interested in. Sometimes, however, it's easier/preferred to collect all interfaces except a few ones. This option enables you to do that: By setting IgnoreSelected to true the effect of Interface is inverted: All selected interfaces are ignored and all other interfaces are collected.

It is possible to use regular expressions to match interface names, if the name is surrounded by /.../ and collectd was compiled with support for regexps. This is useful if there's a need to collect (or ignore) data for a group of interfaces that are similarly named, without the need to explicitly list all of them (especially useful if the list is dynamic). Example:

Interface "lo"
Interface "/^veth/"
Interface "/^tun[0-9]+/"
IgnoreSelected "true"

This will ignore the loopback interface, all interfaces with names starting with veth and all interfaces with names starting with tun followed by at least one digit.

ReportInactive true|false

When set to false, only interfaces with non-zero traffic will be reported. Note that the check is done by looking into whether a package was sent at any time from boot and the corresponding counter is non-zero. So, if the interface has been sending data in the past since boot, but not during the reported time-interval, it will still be reported.

The default value is true and results in collection of the data from all interfaces that are selected by Interface and IgnoreSelected options.

UniqueName true|false

Interface name is not unique on Solaris (KSTAT), interface name is unique only within a module/instance. Following tuple is considered unique: (ks_module, ks_instance, ks_name) If this option is set to true, interface name contains above three fields separated by an underscore. For more info on KSTAT, visit http://docs.oracle.com/cd/E23824_01/html/821-1468/kstat-3kstat.html#REFMAN3Ekstat-3kstat

This option is only available on Solaris.