summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-11-27 21:54:19 +0100
committermh <mh@immerda.ch>2012-11-27 21:54:19 +0100
commitadbfc508abf5bda607795f7bf02f9581e78b17a5 (patch)
treedc386ce36773b0c73575e0baa9412fb372c752ed
parentd43c6ae0fcf45411524d093d21f5cb5c01f7c830 (diff)
filter out many of the useless interfaces that show up
-rw-r--r--manifests/plugins/interfaces.pp16
1 files changed, 9 insertions, 7 deletions
diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp
index cc79259..33fef33 100644
--- a/manifests/plugins/interfaces.pp
+++ b/manifests/plugins/interfaces.pp
@@ -1,21 +1,23 @@
# handle if_ and if_err_ plugins
-class munin::plugins::interfaces {
+class munin::plugins::interfaces {
+
+ # filter out many of the useless interfaces that show up
+ $ifs = regsubst(reject(split($::interfaces, ' |,'), 'eth\d+:\d+|sit0|virbr\d+_nic|vif\d+_\d+|veth\d+'), '(.+)', 'if_\\1')
- $ifs = regsubst(split($::interfaces, " |,"), "(.+)", "if_\\1")
munin::plugin {
- $ifs: ensure => "if_";
+ $ifs: ensure => 'if_';
}
case $::operatingsystem {
openbsd: {
- $if_errs = regsubst(split($::interfaces, " |,"), "(.+)", "if_errcoll_\\1")
+ $if_errs = regsubst(split($::interfaces, ' |,'), '(.+)', 'if_errcoll_\\1')
munin::plugin{
- $if_errs: ensure => "if_errcoll_";
+ $if_errs: ensure => 'if_errcoll_';
}
}
default: {
- $if_errs = regsubst(split($::interfaces, " |,"), "(.+)", "if_err_\\1")
+ $if_errs = regsubst(split($::interfaces, ' |,'), '(.+)', 'if_err_\\1')
munin::plugin{
- $if_errs: ensure => "if_err_";
+ $if_errs: ensure => 'if_err_';
}
}
}