mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
commit
dd4de036bc
2 changed files with 4 additions and 2 deletions
|
@ -45,4 +45,6 @@ except IndexError:
|
||||||
|
|
||||||
async_r = requests.get("http://%s:%s/recon/async" \
|
async_r = requests.get("http://%s:%s/recon/async" \
|
||||||
% (swift_server, os.getenv("SWIFT_OBJECT_PORT", "6000")))
|
% (swift_server, os.getenv("SWIFT_OBJECT_PORT", "6000")))
|
||||||
print "async_pending.value %d" % json.loads(async_r.text)['async_pending']
|
async_r = json.loads(async_r.text)['async_pending']
|
||||||
|
async_r = int(0 if async_r is None else async_r)
|
||||||
|
print "async_pending.value %d" % async_r
|
||||||
|
|
|
@ -64,7 +64,7 @@ except IndexError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
with os.popen("swift-dispersion-report -j %s" \
|
with os.popen("swift-dispersion-report -j %s" \
|
||||||
% os.getenv("SWIFT_DISPERSION_CONFIG", "/etc/swift/swift.conf")) as report:
|
% os.getenv("SWIFT_DISPERSION_CONFIG", "/etc/swift/dispersion.conf")) as report:
|
||||||
stats = json.load(report)
|
stats = json.load(report)
|
||||||
|
|
||||||
for type_, values in stats.iteritems():
|
for type_, values in stats.iteritems():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue