]> gitweb.fluxo.info Git - puppet-virtual.git/commitdiff
move vserver munin plugins into the virtual module
authorMicah Anderson <micah@riseup.net>
Sat, 21 Feb 2009 17:41:10 +0000 (12:41 -0500)
committerMicah Anderson <micah@riseup.net>
Sat, 21 Feb 2009 17:41:10 +0000 (12:41 -0500)
manifests/vserver.pp

index cea83bc8211d8b84c0fa992699ae2fd754f19885..457c904430382b5f06f6610e368f438f8ff21183 100644 (file)
@@ -44,6 +44,62 @@ class vserver::host {
     #  source => "puppet://$server/virtual/hashify.cron.daily",
     #  mode => 0755, owner => root, group => root;
   }
+    locales { $fqdn: }
+
+  # remove dummy interfaces on the host
+  delete_lines { modules_dummy:
+    file => "/etc/modules",
+    pattern => "^dummy",
+  }
+  
+  # Remove these dummy interfaces, they are annoying and we dont need them
+  file { 
+    "/etc/modprobe.d/local-dummy":
+      ensure => absent,
+      mode => 0644, owner => root, group => root;
+        
+    "/usr/local/share/munin-plugins/vserver_resources":
+      source => "$puppet://virtual/munin/vserver_resources",
+      mode => 0755, owner => root, group => root;
+    
+    "/usr/local/share/munin-plugins/vserver_cpu_":
+      source => "$puppet://virtual/munin/vserver_cpu_",
+      mode => 0755, owner => root, group => root;
+    
+    "/usr/local/share/munin-plugins/vserver_loadavg":
+      source => "$puppet/virtual/munin/vserver_loadavg",
+      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";
+  }
 }
 
 define vs_create($in_domain, $context, $legacy = false, $distro = 'etch', $debootstrap_mirror = 'http://ftp.debian.org/debian') {