Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/charleszlu/murmur-info.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharleszlu <c4planted@gmail.com>2014-08-09 09:51:03 +0400
committercharleszlu <c4planted@gmail.com>2014-08-09 09:51:03 +0400
commit31f045e74f4ba72ee48e143b5e9ff82f2bf7747b (patch)
tree889b9091d04ed701050d0fd4ed1a4b184d1aa36f
parent4c45b091210375d126abb991dfb77c8cc9fc9743 (diff)
Update murmur-munin.py
add server state chancount change uptime change
-rw-r--r--murmur-munin.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/murmur-munin.py b/murmur-munin.py
index 19a389e..e8340e7 100644
--- a/murmur-munin.py
+++ b/murmur-munin.py
@@ -80,6 +80,7 @@ if (sys.argv[1:]):
print 'uptime.label Uptime in days'
print 'chancount.label Channelcount/10'
print 'bancount.label Bans on server'
+ print "state.label Mumble server status"
sys.exit(0)
@@ -91,6 +92,7 @@ except Ice.ConnectionRefusedException:
print "chancount.value 0"
print "bancount.value 0"
print "usersnotauth.value 0"
+ print "state.value 0"
ice.shutdown()
sys.exit(1)
@@ -129,13 +131,14 @@ if (sys.argv[1:]):
elif (sys.argv[1] == "chancount"):
print "usersnotauth.value %i" % (usersnotauth)
ice.shutdown()
- sys.exit(0)
+ sys.exit(0)
# if no command line argument is passed in
print "users.value %i" % (len(users))
-print "uptime.value %.2f" % (float(meta.getUptime())/60/60/24)
-print "chancount.value %.1f" % (len(server.getChannels())/10)
+print "uptime.value %i" % (float(meta.getUptime()))
+print "chancount.value %i" % (len(server.getChannels())-1)
print "bancount.value %i" % (len(server.getBans()))
print "usersnotauth.value %i" % (usersnotauth)
-
+print "state.value 1"
+
ice.shutdown()