mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
updated tinychat plugin to also monitor users broadcasting
This commit is contained in:
parent
c6e8f02928
commit
74ee8b7b1a
@ -2,12 +2,15 @@
|
|||||||
#########################
|
#########################
|
||||||
# tinychat_users_
|
# tinychat_users_
|
||||||
#########################
|
#########################
|
||||||
# Munin Plugin to monitor the number of users a tinychat room gets.
|
# Munin Plugin to track monitor the number of users a tinychat room gets.
|
||||||
# Author Phil Wray ( http://www.infjs.com )
|
# Author Phil Wray ( http://www.infjs.com )
|
||||||
|
#
|
||||||
|
#
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# ln -s /usr/share/munin/plugins/tinychat_users_ /etc/munin/plugins/tinychat_users_your-room
|
# ln -s /usr/share/munin/plugins/tinychat_users_ /etc/munin/plugins/tinychat_users_your-room
|
||||||
#
|
#
|
||||||
|
|
||||||
# Get the Tinychat Room by parsing this scripts filename.
|
# Get the Tinychat Room by parsing this scripts filename.
|
||||||
room=${0##*tinychat_users_}
|
room=${0##*tinychat_users_}
|
||||||
|
|
||||||
@ -36,6 +39,8 @@ echo "graph_title Tinychat Users for $room"
|
|||||||
echo 'graph_category misc'
|
echo 'graph_category misc'
|
||||||
echo 'total_count.label Room Users'
|
echo 'total_count.label Room Users'
|
||||||
echo 'total_count.draw AREA'
|
echo 'total_count.draw AREA'
|
||||||
|
echo 'broadcaster_count.draw STACK'
|
||||||
|
echo 'broadcaster_count.label Broadcasting'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -44,6 +49,7 @@ fi
|
|||||||
##
|
##
|
||||||
# Get current Room Users.
|
# Get current Room Users.
|
||||||
tinychat_users=$(curl -s http://api.tinychat.com/${room}.json | grep -Eo 'total_count":[0-9]+' | cut -d':' -f2)
|
tinychat_users=$(curl -s http://api.tinychat.com/${room}.json | grep -Eo 'total_count":[0-9]+' | cut -d':' -f2)
|
||||||
|
broadcasting_users=$(curl -s http://api.tinychat.com/${room}.json | grep -Eo 'broadcaster_count":[0-9]+' | cut -d':' -f2)
|
||||||
# Output Room Users.
|
# Output Room Users.
|
||||||
echo "total_count.value $tinychat_users"
|
echo "total_count.value $tinychat_users"
|
||||||
|
echo "broadcaster_count.value $broadcasting_users"
|
||||||
|
Loading…
Reference in New Issue
Block a user