1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-25 03:43:46 +01:00

Merge pull request #36 from Popsiclestick/patch-1

Fix check_ipa_replication
This commit is contained in:
Garðar Þorsteinsson 2019-04-10 15:21:26 +00:00 committed by GitHub
commit 22062ef76f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,9 +46,9 @@ 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][7:8] == "0":
plugin.status(ok) plugin.status(ok)
elif rhost[1]['nsds5replicaLastUpdateStatus'][0][:2] == "1 ": elif rhost[1]['nsds5replicaLastUpdateStatus'][0][7:8] == "1":
# Busy Replica is not an error, its "unknown" (but its "ok" for now) # Busy Replica is not an error, its "unknown" (but its "ok" for now)
plugin.status(ok) plugin.status(ok)
else: else: