summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2008-01-30 21:37:34 +0000
committermh <mh@immerda.ch>2008-01-30 21:37:34 +0000
commit9082862f719e3fe9eac5192114893e4281a6d1fb (patch)
treeb25e6395540683e05e2da32a9b507e296ff9bc87 /manifests
parent67c51ff64235a6e4df9acdd9d7aa7c28fa547354 (diff)
rearranged some stuff
Diffstat (limited to 'manifests')
-rw-r--r--manifests/client.pp15
-rw-r--r--manifests/plugin.pp48
2 files changed, 57 insertions, 6 deletions
diff --git a/manifests/client.pp b/manifests/client.pp
index 2e8f018..1aa0e88 100644
--- a/manifests/client.pp
+++ b/manifests/client.pp
@@ -40,7 +40,7 @@ class munin::client {
default: {
include munin::plugins::linux
case $virtual {
- xen0: { include munin::plugins::xen }
+ xen0: { include munin::plugins::dom0 }
}
}
}
@@ -100,6 +100,7 @@ class munin::client::darwin
class munin::client::debian
{
+ $script_path_default = "/usr/share/munin/plugins"
package { "munin-node": ensure => installed }
@@ -130,13 +131,15 @@ class munin::client::debian
class munin::client::gentoo
{
- package { 'munin':
+ $script_path_default = "/usr/libexec/munin/plugins"
+ $acpi_available = "absent"
+ package { 'munin':
ensure => present,
category => $operatingsystem ? {
gentoo => 'net-analyzer',
default => '',
},
- }
+ }
file {
@@ -157,18 +160,18 @@ class munin::client::gentoo
}
munin::register { $fqdn: }
-
}
class munin::client::centos
{
- package { 'munin-node':
+ $script_path_default = "/usr/share/munin/plugins"
+ package { 'munin-node':
ensure => present,
category => $operatingsystem ? {
gentoo => 'net-analyzer',
default => '',
},
- }
+ }
file {
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index f21098e..f5919e1 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -145,6 +145,11 @@ class munin::plugins::base {
}
}
}
+
+ case $operatingsystem {
+ gentoo: { $script_path_default = "/usr/libexec/munin/plugins" }
+ default: { $script_path_default = "/usr/share/munin/plugins" }
+ }
}
# handle if_ and if_err_ plugins
@@ -189,8 +194,51 @@ class munin::plugins::vserver inherits munin::plugins::base {
}
class munin::plugins::gentoo inherits munin::plugins::base {
+ file { "$script_path_default/gentoo_lastupdated":
+ source => "puppet://$servername/munin/plugins/gentoo_lastupdated",
+ ensure => file,
+ mode => 0755, owner => root, group => 0;
+ }
+
+ plugin{"gentoo_lastupdated": ensure => present;}
}
class munin::plugins::centos inherits munin::plugins::base {
}
+class munin::plugins::selinux inherits munin::plugins::base {
+ file { "$script_path_default/selinuxenforced":
+ source => "puppet://$servername/munin/plugins/selinuxenforced",
+ ensure => file,
+ mode => 0755, owner => root, group => 0;
+ }
+
+ plugin{"selinuxenforced": ensure => present;}
+}
+
+class munin::plugins::dom0 inherits munin::plugins::base {
+ file {
+ [ "$script_path_default/xen" ]:
+ source => "puppet://$servername/munin/plugins/xen",
+ ensure => file,
+ mode => 0755, owner => root, group => 0;
+ [ "$script_path_default/xen-cpu" ]:
+ source => "puppet://$servername/munin/plugins/xen-cpu",
+ ensure => file,
+ mode => 0755, owner => root, group => 0;
+ [ "$script_path_default/xen_memory" ]:
+ source => "puppet://$servername/munin/plugins/xen_memory",
+ ensure => file,
+ mode => 0755, owner => root, group => 0;
+ [ "$script_path_default/xen_vbd" ]:
+ source => "puppet://$servername/munin/plugins/xen_vbd",
+ ensure => file,
+ mode => 0755, owner => root, group => 0;
+ }
+
+ plugin {
+ [ xen, xen-cpu, xen_memory, xen_vbd ]:
+ ensure => present;
+ }
+}
+