mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 10:28:36 +00:00
Category Tree: Reduce number of categories
ceph -> fs added category for some plugins from "other" section
This commit is contained in:
parent
a8d024ace4
commit
7e56247745
10 changed files with 18 additions and 1 deletions
43
plugins/mumble/mumble_users
Executable file
43
plugins/mumble/mumble_users
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# Munin Plugin for Murmur/ICE
|
||||
# written by T. Fernandez
|
||||
# fixes by Andrew Williams
|
||||
# 07/10/2010
|
||||
#
|
||||
##########################################################
|
||||
|
||||
slicefile = "/usr/share/slice/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('', ['-I' + Ice.getSliceDir(), 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_category voip"
|
||||
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())
|
||||
if server.isRunning():
|
||||
users = server.getUsers()
|
||||
else:
|
||||
users = []
|
||||
print "murmur"+id+".value "+str(users.__len__())
|
||||
quit(0)
|
Loading…
Add table
Add a link
Reference in a new issue