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:
parent
48d91acaf9
commit
fad01c8b91
1 changed files with 42 additions and 38 deletions
|
@ -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())
|
||||
users = server.getUsers()
|
||||
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