diff --git a/plugins/ejabberd/ejabberd_stats_/ejabberd_stats_ b/plugins/ejabberd/ejabberd_stats_/ejabberd_stats_ new file mode 100755 index 00000000..48a98831 --- /dev/null +++ b/plugins/ejabberd/ejabberd_stats_/ejabberd_stats_ @@ -0,0 +1,84 @@ +#!/usr/bin/env bash + +# ejabberd_stats_ revision 1 (Nov 2013) +# +# Tested with ejabberd 2.1.x +# +# This plugin is capable to show: +# - ejabberd connected users +# - in/out s2s connections +# +# Required permissions: +# - run ejabberdctl +# +# OS: *NIX +# +# Author: Artem Sheremet +# +# Configuration: +# - set env.ejabberdctl to ejabberdctl path + +#%# family=auto +#%# capabilities=autoconf suggest + +EJABBERDCTL=${ejabberdctl:-$(which ejabberdctl)} +SCRIPT_NAME=$(basename $0) +STATS_TYPE="${SCRIPT_NAME/ejabberd_stats_/}" + +function ejabberd_stats_connected_users() { + local ejabberdctl_cmd=connected_users_number + if [ "$1" = "config" ]; then + cat <