summaryrefslogtreecommitdiff
path: root/files/munin/ejabberd_registrations.cron
diff options
context:
space:
mode:
Diffstat (limited to 'files/munin/ejabberd_registrations.cron')
-rw-r--r--files/munin/ejabberd_registrations.cron8
1 files changed, 8 insertions, 0 deletions
diff --git a/files/munin/ejabberd_registrations.cron b/files/munin/ejabberd_registrations.cron
new file mode 100644
index 0000000..fc9de3e
--- /dev/null
+++ b/files/munin/ejabberd_registrations.cron
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+for host in `cat /etc/munin/plugin-conf.d/ejabberd_registrations.conf | grep env.vhosts | sed 's/env.vhosts //'`; do
+ stat_file="/var/lib/munin/plugin-state/ejabberd_registrations_${host}"
+ ejabberdctl registered-users $host > $stat_file
+ chgrp munin $stat_file
+ chmod o-rwx $stat_file
+done