mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Fix getenv usage in swift plugins
os.getenv returns a string, not an integer, so using %s will fail if the variable SWIFT_OBJECT_PORT is set.
This commit is contained in:
parent
dc75b52a7d
commit
1e1ca5b633
3 changed files with 6 additions and 6 deletions
|
@ -49,8 +49,8 @@ try:
|
|||
except IndexError:
|
||||
pass
|
||||
|
||||
quarantined = json.loads(requests.get("http://%s:%d/recon/quarantined" \
|
||||
% (swift_server, os.getenv("SWIFT_OBJECT_PORT", 6000))).text)
|
||||
quarantined = json.loads(requests.get("http://%s:%s/recon/quarantined" \
|
||||
% (swift_server, os.getenv("SWIFT_OBJECT_PORT", "6000"))).text)
|
||||
print "quarantined_objects.value %d" % quarantined['objects']
|
||||
print "quarantined_containers.value %d" % quarantined['containers']
|
||||
print "quarantined_accounts.value %d" % quarantined['accounts']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue