mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Fix bug where can't read lock ratio
This commit is contained in:
parent
b02fe4e8e7
commit
68d23cce86
1 changed files with 4 additions and 1 deletions
|
@ -20,6 +20,9 @@ name = "locked"
|
|||
def doData():
|
||||
status = getServerStatus()
|
||||
if status["version"] >= "2.2.0":
|
||||
if status["globalLock"]["lockTime"]["$numberLong"]:
|
||||
ratio = float(status["globalLock"]["lockTime"]["$numberLong"]) / float(status["globalLock"]["totalTime"]["$numberLong"])
|
||||
else:
|
||||
ratio = float(status["globalLock"]["lockTime"]) / status["globalLock"]["totalTime"]
|
||||
else:
|
||||
ratio = status["globalLock"]["ratio"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue