mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Merge pull request #309 from jd/master
Fix getenv usage in swift plugins
This commit is contained in:
commit
b2f44b48ef
@ -43,6 +43,6 @@ try:
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
async_r = requests.get("http://%s:%d/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']
|
print "async_pending.value %d" % json.loads(async_r.text)['async_pending']
|
||||||
|
@ -49,8 +49,8 @@ try:
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
quarantined = json.loads(requests.get("http://%s:%d/recon/quarantined" \
|
quarantined = json.loads(requests.get("http://%s:%s/recon/quarantined" \
|
||||||
% (swift_server, os.getenv("SWIFT_OBJECT_PORT", 6000))).text)
|
% (swift_server, os.getenv("SWIFT_OBJECT_PORT", "6000"))).text)
|
||||||
print "quarantined_objects.value %d" % quarantined['objects']
|
print "quarantined_objects.value %d" % quarantined['objects']
|
||||||
print "quarantined_containers.value %d" % quarantined['containers']
|
print "quarantined_containers.value %d" % quarantined['containers']
|
||||||
print "quarantined_accounts.value %d" % quarantined['accounts']
|
print "quarantined_accounts.value %d" % quarantined['accounts']
|
||||||
|
@ -43,6 +43,6 @@ try:
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
replication_r = requests.get("http://%s:%d/recon/replication" \
|
replication_r = requests.get("http://%s:%s/recon/replication" \
|
||||||
% (swift_server, os.getenv("SWIFT_OBJECT_PORT", 6000)))
|
% (swift_server, os.getenv("SWIFT_OBJECT_PORT", "6000")))
|
||||||
print "object_replication_time.value %f" % json.loads(replication_r.text)['object_replication_time']
|
print "object_replication_time.value %f" % json.loads(replication_r.text)['object_replication_time']
|
||||||
|
Loading…
Reference in New Issue
Block a user