From 6d7494bfe90819273bb6343911f410071b5561a8 Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Tue, 24 Feb 2015 11:25:56 -0500 Subject: Add class parameter to allow customisation of if plugin filter --- manifests/init.pp | 1 + manifests/plugins/interfaces.pp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index bbabf2e..367ba8f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -40,6 +40,7 @@ class munin ( $munin_group = 'absent', $cgi_graphing = false, $cgi_owner = 'os_default', + $if_filter = 'eth\d+_\d+|sit0|virbr\d+_nic|vif\d+_\d+|veth\d+|vnet\d+|__tmp\d+', ) { include munin::client diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp index 35b41fd..2bbc1c6 100644 --- a/manifests/plugins/interfaces.pp +++ b/manifests/plugins/interfaces.pp @@ -2,7 +2,7 @@ class munin::plugins::interfaces { # filter out many of the useless interfaces that show up - $real_ifs = reject(split($::interfaces, ' |,'), 'eth\d+_\d+|sit0|virbr\d+_nic|vif\d+_\d+|veth\d+|vnet\d+|__tmp\d+') + $real_ifs = reject(split($::interfaces, ' |,'), $munin::if_filter) $ifs = prefix($real_ifs, 'if_') $if_err_plugin = $::operatingsystem ? { -- cgit v1.2.3