From 1893960c1babb6a261cc6fc399231e9c0644a104 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 29 Sep 2009 22:51:15 +0200 Subject: refactor everything into its own file --- manifests/plugins/interfaces.pp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 manifests/plugins/interfaces.pp (limited to 'manifests/plugins/interfaces.pp') diff --git a/manifests/plugins/interfaces.pp b/manifests/plugins/interfaces.pp new file mode 100644 index 0000000..99b85ba --- /dev/null +++ b/manifests/plugins/interfaces.pp @@ -0,0 +1,22 @@ +# handle if_ and if_err_ plugins +class munin::plugins::interfaces inherits munin::plugins::base { + + $ifs = gsub(split($interfaces, " |,"), "(.+)", "if_\\1") + munin::plugin { + $ifs: ensure => "if_"; + } + case $operatingsystem { + openbsd: { + $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_errcoll_\\1") + munin::plugin{ + $if_errs: ensure => "if_errcoll_"; + } + } + default: { + $if_errs = gsub(split($interfaces, " |,"), "(.+)", "if_err_\\1") + munin::plugin{ + $if_errs: ensure => "if_err_"; + } + } + } +} -- cgit v1.2.3