mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-25 03:43:46 +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:
parent
944d47e18e
commit
871c8348fa
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user