1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-26 02:48:28 +00:00

Checks if the virtual server is booted before attempting to read the userlist. Stops weird and wonderful crashes in a non-static setup.

This commit is contained in:
Andrew Williams 2010-10-07 16:19:21 +02:00 committed by Steve Schnepp
parent 48d91acaf9
commit fad01c8b91

View file

@ -2,11 +2,12 @@
#
# Munin Plugin for Murmur/ICE
# written by T. Fernandez
# 02/03/2010
# fixes by Andrew Williams
# 07/10/2010
#
##########################################################
slicefile = "./Murmur.ice"
slicefile = "/usr/share/slice/Murmur.ice"
prxstr = "Meta:tcp -h 127.0.0.1 -p 6502"
import os
@ -33,6 +34,9 @@ if (sys.argv.__len__() == 2) and (sys.argv[1] == "config"):
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)