1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-22 10:23:46 +01:00

Merge pull request #19 from TJM/issue-18-ipa-busy-replica

Issue #18 - Replica Busy is not critical
This commit is contained in:
Pall Sigurdsson 2015-10-17 22:49:26 +11:00
commit 7dc3b57582

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")