summaryrefslogtreecommitdiff
path: root/manifests/plugin.pp
diff options
context:
space:
mode:
authormh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2008-04-24 13:26:14 +0000
committermh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2008-04-24 13:26:14 +0000
commit9dca19736cd11ed42cfdb8aed30c8628b22231cb (patch)
treefddac14151d5157edc5dd6c1f51f3f82e834479e /manifests/plugin.pp
parentb1381333f577b0b4c6ff17a2cfff1abfa58c00e3 (diff)
merged with puzzle upstream
git-svn-id: https://svn/ipuppet/trunk/modules/munin@1254 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
Diffstat (limited to 'manifests/plugin.pp')
-rw-r--r--manifests/plugin.pp27
1 files changed, 26 insertions, 1 deletions
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index ac25abf..6a92c56 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -93,8 +93,9 @@ define munin::remoteplugin($ensure = "present", $source, $config = '') {
}
}
define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') {
+ $plugin_src = $ensure ? { "present" => $name, default => $ensure }
$real_source = $source ? {
- '' => "munin/plugins/$name",
+ '' => "munin/plugins/$plugin_src",
default => $source
}
include munin::plugin::scriptpaths
@@ -142,6 +143,21 @@ class munin::plugins::base {
}
}
}
+ case $kernel {
+ linux: {
+ case $vserver {
+ guest: { include munin::plugins::vserver }
+ default: {
+ include munin::plugins::linux
+ }
+ }
+ }
+ }
+ case $virtual {
+ physical: { include munin::plugins::physical }
+ xen0: { include munin::plugins::dom0 }
+ xenu: { include munin::plugins::domU }
+ }
}
# handle if_ and if_err_ plugins
@@ -195,6 +211,7 @@ class munin::plugins::dom0 inherits munin::plugins::physical {
munin::plugin::deploy { "xen-cpu": config => "user root"}
munin::plugin::deploy { "xen_memory": config => "user root"}
munin::plugin::deploy { "xen_vbd": config => "user root"}
+ munin::plugin::deploy { "xen_traffic_all": config => "user root"}
}
class munin::plugins::physical inherits munin::plugins::base {
@@ -229,3 +246,11 @@ class munin::plugins::postgres inherits munin::plugins::base {
munin::plugin::deploy { "pg__connections": ensure => false }
munin::plugin::deploy { "pg__locks": ensure => false }
}
+class munin::plugins::nagios inherits munin::plugins::base {
+ munin::plugin::deploy {
+ nagios_hosts: config => 'user root';
+ nagios_svc: config => 'user root';
+ nagios_perf_hosts: ensure => nagios_perf_, config => 'user root';
+ nagios_perf_svc: ensure => nagios_perf_, config => 'user root';
+ }
+}