aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp4
-rw-r--r--manifests/munin.pp23
2 files changed, 27 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index c8ac5f3..90782b1 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -13,4 +13,8 @@ class tor {
hasstatus => true,
require => Package['tor'],
}
+
+ if $use_munin {
+ include tor::munin
+ }
}
diff --git a/manifests/munin.pp b/manifests/munin.pp
new file mode 100644
index 0000000..6e6e0fa
--- /dev/null
+++ b/manifests/munin.pp
@@ -0,0 +1,23 @@
+class tor::munin {
+
+ file {
+ "/usr/local/share/munin-plugins/tor_connections":
+ source => "puppet://$server/modules/tor/munin/tor_connections",
+ mode => 0755, owner => root, group => root;
+
+ "/usr/local/share/munin-plugins/tor_routers":
+ source => "puppet://$server/modules/tor/munin/tor_routers",
+ mode => 0755, owner => root, group => root;
+
+ "/usr/local/share/munin-plugins/tor_traffic":
+ source => "puppet://$server/modules/tor/munin/tor_traffic",
+ mode => 0755, owner => root, group => root;
+ }
+
+ munin::plugin {
+ [ "tor_connections", "tor_routers", "tor_traffic" ]:
+ ensure => present,
+ config => "user debian-tor\n env.cookiefile /var/lib/tor/control_auth_cookie",
+ script_path_in => "/usr/local/share/munin-plugins";
+ }
+}