From: Jakub Jankowski Date: Thu, 21 Jan 2016 16:15:20 +0000 (+0100) Subject: docs: mention regexps for the interface plugin X-Git-Tag: collectd-5.5.1^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=01bb122fca4bd5c767b795f9cff364d01f0573c3;p=collectd.git docs: mention regexps for the interface plugin It is very useful to collect data (or ignore) from a group of interfaces that are similarly named - especially if the list is dynamic and it's not feasible to update configuration each time an interface shows up or disappears. It's possible to use regexps to specify interfaces to collect data from (or ignore), but it's not clearly stated anywhere in the documentation. This is an attempt to improve documentation in this area. Signed-off-by: Jakub Jankowski --- diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 25e2b77a..f4bd32ae 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -2002,6 +2002,23 @@ do that: By setting B to I the effect of B 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 I 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 I and all interfaces with names starting with I followed by +at least one digit. + + =back =head2 Plugin C