Skip to content

Commit

Permalink
Issue opinkerfi#18 - Replica Busy is not critical
Browse files Browse the repository at this point in the history
Changed the plugin.status to allow for status 0 or status 1.
  • Loading branch information
Tommy McNeely committed Oct 1, 2015
1 parent 944d47e commit 871c834
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions check_ipa/check_ipa_replication
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ except Exception, e:
# Loop through replication agreements
for rhost in replication:
plugin.add_summary("Replica %s Status: %s" % (rhost[1]['nsDS5ReplicaHost'][0], rhost[1]['nsds5replicaLastUpdateStatus'][0]))
if rhost[1]['nsds5replicaLastUpdateStatus'][0][:2] != "0 ":
plugin.status(critical)
else:
if rhost[1]['nsds5replicaLastUpdateStatus'][0][:2] == "0 ":
plugin.status(ok)
elif rhost[1]['nsds5replicaLastUpdateStatus'][0][:2] == "1 ":
# Busy Replica is not an error, its "unknown" (but its "ok" for now)
plugin.status(ok)
else:
plugin.status(critical)

if not len(replication):
plugin.add_summary("Warning: No replicas found")
Expand Down

0 comments on commit 871c834

Please sign in to comment.