2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Initial version

This commit is contained in:
Tobias Fernandez 2010-02-03 14:50:54 +01:00 committed by Steve Schnepp
parent 99346c44e3
commit 391d15269b

38
plugins/other/mumble_users Executable file
View File

@ -0,0 +1,38 @@
#!/usr/bin/python
#
# Munin Plugin for Murmur/ICE
# written by T. Fernandez
# 02/03/2010
#
##########################################################
slicefile = "./Murmur.ice"
prxstr = "Meta:tcp -h 127.0.0.1 -p 6502"
import os
import sys
import Ice
if not os.path.exists(slicefile):
print slicefile+" not found!"
quit(1)
Ice.loadSlice(slicefile)
import Murmur
ice = Ice.initialize()
prx = ice.stringToProxy(prxstr)
murmur = Murmur.MetaPrx.checkedCast(prx)
if (sys.argv.__len__() == 2) and (sys.argv[1] == "config"):
print "graph_title Mumble users"
print "graph_vlabel users"
print "graph_args --lower-limit 0"
for server in murmur.getAllServers():
id = str(server.id())
print "murmur"+id+".label Server "+id
else:
for server in murmur.getAllServers():
id = str(server.id())
users = server.getUsers()
print "murmur"+id+".value "+str(users.__len__())
quit(0)