From 3cf7362f383d2cfa705c3897f6199087c5ddb033 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 15 Mar 2015 12:27:18 +0100 Subject: exchange connections munin plugin tor_connections started blocking and I wasn't able to find the root cause for it nor an updated version of the plugin. This also blocked munin itself, which had the issue that the node disappeared within munin. Based on https://lists.torproject.org/pipermail/tor-talk/2006-June/010486.html it seems to more or less match the open filedescriptors and hence we monitor rather this than rely on a unmanageable plugin. The only drawback is that this must run as root, as non-root users can't read the filedescriptors from proc. --- manifests/munin.pp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'manifests/munin.pp') diff --git a/manifests/munin.pp b/manifests/munin.pp index 4412337..ef71f57 100644 --- a/manifests/munin.pp +++ b/manifests/munin.pp @@ -11,8 +11,9 @@ class tor::munin { config => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie\n env.port 19051" } munin::plugin::deploy { - 'tor_connections': - source => 'tor/munin/tor_connections'; + 'tor_openfds': + config => 'user root', + source => 'tor/munin/tor_openfds'; 'tor_routers': source => 'tor/munin/tor_routers'; 'tor_traffic': -- cgit v1.2.3 From d08f07eae13d02431b1c4142634f49e978b551de Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 4 Sep 2016 21:00:45 +0200 Subject: make module also work on EL7 * user is different * user must not be managed * make access more safe, it doesn't make sense that the user running the daemon owns the config, nor the config directory. --- manifests/munin.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manifests/munin.pp') diff --git a/manifests/munin.pp b/manifests/munin.pp index ef71f57..1b043f1 100644 --- a/manifests/munin.pp +++ b/manifests/munin.pp @@ -7,8 +7,9 @@ class tor::munin { cookie_auth_file => '/var/run/tor/control.authcookie', } + include ::tor::daemon::params Munin::Plugin::Deploy { - config => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie\n env.port 19051" + config => "user ${tor::daemon::params::user}\n env.cookiefile /var/run/tor/control.authcookie\n env.port 19051" } munin::plugin::deploy { 'tor_openfds': -- cgit v1.2.3 From 6deb959721ba5e90d876ff34343c0926730faf7b Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 9 Nov 2016 23:05:37 +0100 Subject: set it to a port allowed by munin --- manifests/munin.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/munin.pp') diff --git a/manifests/munin.pp b/manifests/munin.pp index 1b043f1..67e8c57 100644 --- a/manifests/munin.pp +++ b/manifests/munin.pp @@ -2,18 +2,18 @@ class tor::munin { tor::daemon::control{ 'control_port_for_munin': - port => 19051, + port => 9001, cookie_authentication => 1, cookie_auth_file => '/var/run/tor/control.authcookie', } include ::tor::daemon::params Munin::Plugin::Deploy { - config => "user ${tor::daemon::params::user}\n env.cookiefile /var/run/tor/control.authcookie\n env.port 19051" + config => "user ${tor::daemon::params::user}\n env.cookiefile /var/run/tor/control.authcookie\n env.port 9001" } munin::plugin::deploy { 'tor_openfds': - config => 'user root', + config => 'user root', source => 'tor/munin/tor_openfds'; 'tor_routers': source => 'tor/munin/tor_routers'; -- cgit v1.2.3