1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-05 10:03:45 +01:00

Issue #18 - Replica Busy is not critical

Changed the plugin.status to allow for status 0 or status 1.
This commit is contained in:
Tommy McNeely 2015-10-01 15:45:14 -06:00
parent 944d47e18e
commit 871c8348fa

View File

@ -46,10 +46,13 @@ except Exception, e:
# Loop through replication agreements # Loop through replication agreements
for rhost in replication: for rhost in replication:
plugin.add_summary("Replica %s Status: %s" % (rhost[1]['nsDS5ReplicaHost'][0], rhost[1]['nsds5replicaLastUpdateStatus'][0])) plugin.add_summary("Replica %s Status: %s" % (rhost[1]['nsDS5ReplicaHost'][0], rhost[1]['nsds5replicaLastUpdateStatus'][0]))
if rhost[1]['nsds5replicaLastUpdateStatus'][0][:2] != "0 ": if rhost[1]['nsds5replicaLastUpdateStatus'][0][:2] == "0 ":
plugin.status(critical)
else:
plugin.status(ok) 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): if not len(replication):
plugin.add_summary("Warning: No replicas found") plugin.add_summary("Warning: No replicas found")