aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-12-26 15:24:59 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-12-26 15:24:59 -0200
commitbb323275ceedde5655d31e335bf799b1fa88521c (patch)
tree5a4a2689e2103ae18e5c7e150e6debf9d97de4df /manifests
parentf9409341395c36555ed1ed1c07f174c5f9a9e23b (diff)
downloadpuppet-virtual-bb323275ceedde5655d31e335bf799b1fa88521c.tar.gz
puppet-virtual-bb323275ceedde5655d31e335bf799b1fa88521c.tar.bz2
Setup plugins just if munin is enabled in the system
Diffstat (limited to 'manifests')
-rw-r--r--manifests/vserver.pp62
1 files changed, 34 insertions, 28 deletions
diff --git a/manifests/vserver.pp b/manifests/vserver.pp
index 459d1fd..fe4a822 100644
--- a/manifests/vserver.pp
+++ b/manifests/vserver.pp
@@ -70,34 +70,40 @@ class vserver::host {
mode => 0755, owner => root, group => root;
}
- # This creates a load average graph combining the individual load averages of each vserver on the host
- munin::plugin {
- "vserver_loadavg":
- config => "user root\n",
- script_path => "/usr/local/share/munin-plugins";
- }
-
- # This creates a RSS graph for each vserver on the host (note after more than 4 vservers this can get noisy)
- munin::plugin {
- "vserver_resources_RSS":
- ensure => "vserver_resources",
- config => "user root\nenv.resource RSS",
- script_path => "/usr/local/share/munin-plugins";
- }
-
- # This creates a VM graph for each vserver on the host (note after more than 4 vservers this can get noisy)
- munin::plugin {
- "vserver_resources_VM":
- ensure => "vserver_resources",
- config => "user root\nenv.resource VM",
- script_path => "/usr/local/share/munin-plugins";
- }
-
- # This creates a VM graph for each vserver on the host (note after more than 4 vservers this can get noisy)
- munin::plugin {
- "vserver_cpu_":
- config => "user root\n",
- script_path => "/usr/local/share/munin-plugins";
+ # Setup some plugins if munin is enabled in the system
+ case $munin_cidr_allow {
+ '': {}
+ default: {
+ # This creates a load average graph combining the individual load averages of each vserver on the host
+ munin::plugin {
+ "vserver_loadavg":
+ config => "user root\n",
+ script_path => "/usr/local/share/munin-plugins";
+ }
+
+ # This creates a RSS graph for each vserver on the host (note after more than 4 vservers this can get noisy)
+ munin::plugin {
+ "vserver_resources_RSS":
+ ensure => "vserver_resources",
+ config => "user root\nenv.resource RSS",
+ script_path => "/usr/local/share/munin-plugins";
+ }
+
+ # This creates a VM graph for each vserver on the host (note after more than 4 vservers this can get noisy)
+ munin::plugin {
+ "vserver_resources_VM":
+ ensure => "vserver_resources",
+ config => "user root\nenv.resource VM",
+ script_path => "/usr/local/share/munin-plugins";
+ }
+
+ # This creates a VM graph for each vserver on the host (note after more than 4 vservers this can get noisy)
+ munin::plugin {
+ "vserver_cpu_":
+ config => "user root\n",
+ script_path => "/usr/local/share/munin-plugins";
+ }
+ }
}
}