summaryrefslogtreecommitdiff
path: root/checks/gluster
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-11-25 00:41:12 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-11-25 00:41:12 (GMT)
commit6014b438ade5bfe80681d4b4201c7252bcee04c6 (patch)
tree4ecbd1b247dc5852690fa99481a8aced1d949360 /checks/gluster
parent7cbbe5220511fb3d28661cb7fccd3cf2d1fc50e3 (diff)
added rhctl check
Diffstat (limited to 'checks/gluster')
-rw-r--r--checks/gluster8
1 files changed, 4 insertions, 4 deletions
diff --git a/checks/gluster b/checks/gluster
index ef3e37f..64161c1 100644
--- a/checks/gluster
+++ b/checks/gluster
@@ -74,7 +74,7 @@ def inventory_gluster_volume_status(info):
uuids.append(line[0])
inventory.append((vol, uuids))
-
+
return inventory
@@ -93,7 +93,7 @@ def check_gluster_volume_status(item, params, info):
status = OK
message = "%i of %i bricks online" % (len(lines), len(params))
-
+
for uuid in uuids:
if uuids[uuid][0] > 0:
message += ", found new peer %s(!) - please update inventory" % uuid
@@ -107,7 +107,7 @@ def check_gluster_volume_status(item, params, info):
if uuids[uuid][2] != '1':
message += ", status(!) of peer %s" % uuid
status = WARN if WARN > status else status
-
+
p = (float(uuids[uuid][4]) / float(uuids[uuid][3])) * 100.0
if p < 20.0:
message += ", %s@%s has less then 20%% free space(!)" % (uuids[uuid][5], uuids[uuid][1])
@@ -124,7 +124,7 @@ def check_gluster_volume_status(item, params, info):
check_info["gluster.peers"] = {
'check_function': check_gluster_peers,
'inventory_function': inventory_gluster_peers,
- 'service_description': 'state of glusterfs peer',
+ 'service_description': 'state of glusterfs peer %s',
}
check_info["gluster.vol_status"] = {