From e0cf3dc7de751df2b51e4a00cf397537da147e32 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 2 Jan 2013 14:14:28 +0100 Subject: manage a dedicated control port for munin --- manifests/daemon.pp | 5 ++++- manifests/init.pp | 5 ----- manifests/munin.pp | 9 ++++++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/manifests/daemon.pp b/manifests/daemon.pp index 000c959..2440180 100644 --- a/manifests/daemon.pp +++ b/manifests/daemon.pp @@ -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 + } } diff --git a/manifests/init.pp b/manifests/init.pp index 3653c89..c6e4e04 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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 - } } diff --git a/manifests/munin.pp b/manifests/munin.pp index e1b369a..4412337 100644 --- a/manifests/munin.pp +++ b/manifests/munin.pp @@ -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': -- cgit v1.2.3