summaryrefslogtreecommitdiff
path: root/manifests/plugins
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-11-27 22:08:14 +0100
committermh <mh@immerda.ch>2012-11-27 22:08:14 +0100
commitbc23eb26287c343358a6bfbb9a776a67db39d02e (patch)
tree296fff757640b36661ce92df482b1759803a0187 /manifests/plugins
parentadbfc508abf5bda607795f7bf02f9581e78b17a5 (diff)
improve regexp
Diffstat (limited to 'manifests/plugins')
-rw-r--r--manifests/plugins/interfaces.pp7
1 files changed, 4 insertions, 3 deletions
diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp
index 33fef33..7e9819c 100644
--- a/manifests/plugins/interfaces.pp
+++ b/manifests/plugins/interfaces.pp
@@ -2,20 +2,21 @@
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')
+ $real_ifs = reject(split($::interfaces, ' |,'), 'eth\d+:\d+|sit0|virbr\d+_nic|vif\d+_\d+|veth\d+')
+ $ifs = regsubst($real_ifs, '(.+)', "if_\\1")
munin::plugin {
$ifs: ensure => 'if_';
}
case $::operatingsystem {
openbsd: {
- $if_errs = regsubst(split($::interfaces, ' |,'), '(.+)', 'if_errcoll_\\1')
+ $if_errs = regsubst($real_ifs, '(.+)', "if_errcoll_\\1")
munin::plugin{
$if_errs: ensure => 'if_errcoll_';
}
}
default: {
- $if_errs = regsubst(split($::interfaces, ' |,'), '(.+)', 'if_err_\\1')
+ $if_errs = regsubst($real_ifs, '(.+)', "if_err_\\1")
munin::plugin{
$if_errs: ensure => 'if_err_';
}