]> gitweb.fluxo.info Git - puppet-tor.git/commitdiff
manage a dedicated control port for munin
authormh <mh@immerda.ch>
Wed, 2 Jan 2013 13:14:28 +0000 (14:14 +0100)
committermh <mh@immerda.ch>
Wed, 2 Jan 2013 13:14:28 +0000 (14:14 +0100)
manifests/daemon.pp
manifests/init.pp
manifests/munin.pp

index 000c959d22d4f952d141628803eb5a56ef28ab41..24401804a3712e66141f0041f5ca2bd7ec5e788b 100644 (file)
@@ -11,8 +11,11 @@ class tor::daemon (
 
   class{'tor':
     ensure_version => $ensure_version,
-    use_munin      => $use_munin,
   }
 
   include tor::daemon::base
+
+  if $use_munin {
+    include tor::munin
+  }
 }
index 3653c896b77af695284e22cab079e30c204847ee..c6e4e04c2ebf7b58d87434c8c3c51dfa50e5aa51 100644 (file)
@@ -1,12 +1,7 @@
 # manage a basic tor installation
 class tor (
   $ensure_version = 'installed',
-  $use_munin      = false
 ){
 
   include tor::base
-
-  if $use_munin {
-    include tor::munin
-  }
 }
index e1b369ae82e2ac72155eca92bf6d7402a6f8f507..4412337a7a4d233018671c2d4aaad8daa0e3abaa 100644 (file)
@@ -1,7 +1,14 @@
 # munin plugins for puppet
 class tor::munin {
+  tor::daemon::control{
+    'control_port_for_munin':
+      port                  => 19051,
+      cookie_authentication => 1,
+      cookie_auth_file      => '/var/run/tor/control.authcookie',
+  }
+
   Munin::Plugin::Deploy {
-    config  => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie"
+    config  => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie\n env.port 19051"
   }
   munin::plugin::deploy {
     'tor_connections':