Package: munin-plugins-extra
Version: 1.4.5-2
Severity: normal

As for the first part of this bug, once ejabberd_ plugins have been
enabled, I get a bazillion logs like the following, and all graphing
fails:

  2010/09/20 09:40:38 [WARNING] munin_set_var_loc: Setting unknown option 
'uptime' at Unzane;nyarlathotep.unzane.com:ejabberd_uptime Can't use string 
("in days") as a HASH ref while "strict refs" in use at 
/usr/share/perl5/Munin/Master/Utils.pm line 609.

This is because the script has a broken line of "config" output for the
uptime flavor:

  echo 'uptime in days'

Next part of this bug is that the scripts invocation of ejabberdctl
seems to use an old syntax that is no longer supported with the ejabberd
2.1.5 versions currently in Debian squeeze.

In particular it's exeucting commands like:

  ejabberdctl vhost $host stats onlineusers

The 'vhost $host' args are gone and should be substitued with subcommand
specific bits like:

  ejabberdctl stats-host onlineusers $host

Attached is a simple patch that solves both.

Thanks!

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored:
LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages munin-plugins-extra depends on:
ii  munin-node                    1.4.5-2    network-wide graphing
framework (n
ii  perl                          5.10.1-14  Larry Wall's Practical
Extraction

munin-plugins-extra recommends no packages.

Versions of packages munin-plugins-extra suggests:
pn  libnet-netmask-perl           <none>     (no description available)
pn  libnet-telnet-perl            <none>     (no description available)
ii  python                        2.6.5-13   interactive high-level
object-orie

-- no debconf information

-- 
Gerald Turner   Email: gtur...@unzane.com   JID: gtur...@unzane.com
GPG: 0xFA8CD6D5  21D9 B2E8 7FE7 F19E 5F7D  4D0C 3FA0 810F FA8C D6D5
--- munin-1.4.5.orig/plugins/node.d/ejabberd_.in	2009-11-20 15:41:39.000000000 -0800
+++ munin-1.4.5/plugins/node.d/ejabberd_.in	2010-09-20 23:16:52.000000000 -0700
@@ -220,7 +220,7 @@
 	done;
     elif [ "$MODE" = "uptime" ]; then
 	echo 'graph_title Uptime of ejabberd server'
-	echo 'uptime in days'
+	echo 'graph_vlabel uptime in days'
 	echo "uptime.label uptime"
 	echo 'uptime.draw AREA'
     fi
@@ -237,7 +237,7 @@
 if [ "$MODE" = "users" ]; then
     for host in $vhosts; do
 	formathost=$(echo $host | tr '.' '_')
-	echo "connected_users_$formathost.value $($EJCTL vhost $host stats onlineusers)"; 
+	echo "connected_users_$formathost.value $($EJCTL stats-host onlineusers $host)"; 
 	echo "connected_unique_users_$formathost.value $($EJCTL connected-users | awk -v var=$host -F/ '{users[$1]} END {for (user in users) {if (index(user,var)) {count++}} print count}')"; 
     done
     exit 0
@@ -246,7 +246,7 @@
 if [ "$MODE" = "registrations" ]; then
     for host in $vhosts; do
 	formathost=$(echo $host | tr '.' '_')
-	num=$($EJCTL vhost $host stats registeredusers)
+	num=$($EJCTL stats-host registeredusers $host)
         if [ "$?" != 0 ]; then
             num="U"
         fi
@@ -259,7 +259,7 @@
    for host in $vhosts; do
 	formathost=$(echo $host | tr '.' '_')
 		for status in $statuses; do
-			num=$($EJCTL vhost $host status-num $status)
+			num=$($EJCTL status-num-host $status $host)
 			if [ "$?" != 0 ]; then
 				num="U"
 			fi
@@ -284,12 +284,12 @@
         for host in $vhosts; do
                 for num in $days; do
                         formathost=$(echo $host | tr '.' '_')
-                        echo "usersindays_${formathost}_${num}.value $($EJCTL vhost $host num-active-users $num)";
+                        echo "usersindays_${formathost}_${num}.value $($EJCTL num-active-users $host $num)";
                 done;
         done;
 	exit 0
 fi
 
 if [ "$MODE" = "uptime" ]; then
-	echo "uptime.value $($EJCTL stats uptime-seconds | awk '{printf "%.2f", $1/86400}')"
+	echo "uptime.value $($EJCTL stats uptimeseconds | awk '{printf "%.2f", $1/86400}')"
 fi

Reply via email to