From 7ff648da5eeac0211aa40aac0251b681911ab8d6 Mon Sep 17 00:00:00 2001 From: pitchum Date: Tue, 16 Mar 2021 08:40:41 +0100 Subject: [PATCH] Add number of distinct active users --- metrology/collectd_exec_xmpp.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/metrology/collectd_exec_xmpp.sh b/metrology/collectd_exec_xmpp.sh index 636b95d..0b3ebb1 100755 --- a/metrology/collectd_exec_xmpp.sh +++ b/metrology/collectd_exec_xmpp.sh @@ -18,6 +18,7 @@ main() { ejabberdctl_stats() { echo "PUTVAL \"${HOSTNAME}/xmpp_registered_users/count\" interval=$INTERVAL $(date +%s):$(ejabberdctl registered_users chapril.org | wc -l)" echo "PUTVAL \"${HOSTNAME}/xmpp_active_users/count\" interval=$INTERVAL $(date +%s):$(ejabberdctl connected_users_number)" + echo "PUTVAL \"${HOSTNAME}/xmpp_active_distinct_users/count\" interval=$INTERVAL $(date +%s):$(ejabberdctl connected_users | cut -d@ -f1 | sort -u | wc -l)" echo "PUTVAL \"${HOSTNAME}/xmpp_s2s_in/count\" interval=$INTERVAL $(date +%s):$(ejabberdctl incoming_s2s_number)" echo "PUTVAL \"${HOSTNAME}/xmpp_s2s_out/count\" interval=$INTERVAL $(date +%s):$(ejabberdctl outgoing_s2s_number)" echo "PUTVAL \"${HOSTNAME}/xmpp_muc_total/count\" interval=$INTERVAL $(date +%s):$(ejabberdctl muc_online_rooms muc.chapril.org | wc -l)"