mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-27 11:24:42 +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
|
# Munin Plugin for Murmur/ICE
|
||||||
# written by T. Fernandez
|
# 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"
|
prxstr = "Meta:tcp -h 127.0.0.1 -p 6502"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -33,6 +34,9 @@ if (sys.argv.__len__() == 2) and (sys.argv[1] == "config"):
|
||||||
else:
|
else:
|
||||||
for server in murmur.getAllServers():
|
for server in murmur.getAllServers():
|
||||||
id = str(server.id())
|
id = str(server.id())
|
||||||
users = server.getUsers()
|
if server.isRunning():
|
||||||
|
users = server.getUsers()
|
||||||
|
else:
|
||||||
|
users = []
|
||||||
print "murmur"+id+".value "+str(users.__len__())
|
print "murmur"+id+".value "+str(users.__len__())
|
||||||
quit(0)
|
quit(0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue