Update index.py

pull/109/head
midoks 3 years ago
parent 0034e852d5
commit 1451a38be8
  1. 8
      plugins/mongodb/index.py

@ -202,11 +202,17 @@ def runInfo():
result["uptime"] = serverStatus['uptime'] result["uptime"] = serverStatus['uptime']
result['db_path'] = '/var/lib/mongo' result['db_path'] = '/var/lib/mongo'
if os.path.exists("/var/lib/mongodb"):
result['db_path'] = '/var/lib/mongodb'
if mw.isAppleSystem(): if mw.isAppleSystem():
result['db_path'] = getServerDir() + "/data" result['db_path'] = getServerDir() + "/data"
result["connections"] = serverStatus['connections']['current'] result["connections"] = serverStatus['connections']['current']
result["collections"] = serverStatus['catalogStats']['collections']
if 'catalogStats' in serverStatus:
result["collections"] = serverStatus['catalogStats']['collections']
result["dbs"] = showDbList result["dbs"] = showDbList
return mw.getJson(result) return mw.getJson(result)

Loading…
Cancel
Save