summaryrefslogtreecommitdiff
path: root/manifests/munin.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/munin.pp')
-rw-r--r--manifests/munin.pp27
1 files changed, 20 insertions, 7 deletions
diff --git a/manifests/munin.pp b/manifests/munin.pp
index 1357e98..33f15d4 100644
--- a/manifests/munin.pp
+++ b/manifests/munin.pp
@@ -1,14 +1,27 @@
+# install munin plugin and helpers
class ejabberd::munin {
- case $ejabberd_domains {
- '': { $ejabberd_domains = $fqdn }
- }
- munin::plugin::deploy{'ejabberd_':
- source => "ejabberd/munin/ejabberd_",
+ munin::plugin::deploy{'ejabberd_':
ensure => absent,
+ source => 'ejabberd/munin/ejabberd_';
}
+ $domains = join($ejabberd::domains, ' ')
munin::plugin{['ejabberd_users','ejabberd_connections','ejabberd_registrations']:
+ ensure => 'ejabberd_',
require => Munin::Plugin::Deploy['ejabberd_'],
- ensure => 'ejabberd_',
- config => "env.vhosts ${ejabberd_domains}\ntimeout 20\nuser root\ngroup root"
+ config => "group munin\nenv.vhosts ${domains}";
+ }
+ File {
+ owner => root,
+ group => 0,
+ mode => '0700',
+ }
+ file{
+ '/etc/cron.daily/ejabberd_registrations':
+ require => Munin::Plugin['ejabberd_registrations'],
+ source => 'puppet:///modules/ejabberd/munin/ejabberd_registrations.cron';
+ '/etc/cron.d/ejabberd_munin':
+ require => Munin::Plugin['ejabberd_users','ejabberd_connections'],
+ mode => '0600',
+ source => 'puppet:///modules/ejabberd/munin/ejabberd_munin.cron';
}
}