From 871c8348fa9481389586927f127917e1e638a978 Mon Sep 17 00:00:00 2001 From: Tommy McNeely Date: Thu, 1 Oct 2015 15:45:14 -0600 Subject: [PATCH] Issue #18 - Replica Busy is not critical Changed the plugin.status to allow for status 0 or status 1. --- check_ipa/check_ipa_replication | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/check_ipa/check_ipa_replication b/check_ipa/check_ipa_replication index 86e2ed1..bfedadc 100644 --- a/check_ipa/check_ipa_replication +++ b/check_ipa/check_ipa_replication @@ -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")