Fixed service output for warn/crit states, cleared mixed indentation.
This commit is contained in:
parent
cefba89f21
commit
2392bc8390
Binary file not shown.
BIN
check_mk-infoblox/infoblox_dns-1.0.1.mkp
Normal file
BIN
check_mk-infoblox/infoblox_dns-1.0.1.mkp
Normal file
Binary file not shown.
@ -37,18 +37,18 @@ def check_infoblox_aat5_count(item, params, info):
|
|||||||
if params:
|
if params:
|
||||||
warn, crit = params['infoblox_count']
|
warn, crit = params['infoblox_count']
|
||||||
else:
|
else:
|
||||||
warn, crit = (50, 100)
|
warn, crit = (50, 100)
|
||||||
state = 0
|
state = 0
|
||||||
count_info = ""
|
count_info = ""
|
||||||
if count > warn:
|
if count > warn:
|
||||||
if count > crit:
|
if count > crit:
|
||||||
state = 2
|
state = 2
|
||||||
count_info = "(crit above %s)" % crit
|
count_info = "Number of AAT5 Requests is %s (crit above %s requests)" % (count, crit)
|
||||||
else:
|
else:
|
||||||
state = 1
|
state = 1
|
||||||
count_info = "(warn above %s)" % warn
|
count_info = "Number of AAT5 Requests is %s (warn above %s requests)" % (count, warn)
|
||||||
else:
|
else:
|
||||||
count_info = "Count is is %s" % count
|
count_info = "Number of AAT5 Requests is %s" % count
|
||||||
yield state, count_info, [('Count', count, warn, crit)]
|
yield state, count_info, [('Count', count, warn, crit)]
|
||||||
|
|
||||||
check_info['infoblox_aat5_count'] = {
|
check_info['infoblox_aat5_count'] = {
|
||||||
|
@ -33,24 +33,22 @@ def inventory_infoblox_aat5_latency(info):
|
|||||||
yield item, {}
|
yield item, {}
|
||||||
|
|
||||||
def check_infoblox_aat5_latency(item, params, info):
|
def check_infoblox_aat5_latency(item, params, info):
|
||||||
print item
|
|
||||||
latency=int(info[0][0])
|
latency=int(info[0][0])
|
||||||
print params
|
|
||||||
if params:
|
if params:
|
||||||
warn, crit = params['infoblox_latency']
|
warn, crit = params['infoblox_latency']
|
||||||
else:
|
else:
|
||||||
warn, crit = (50, 100)
|
warn, crit = (50, 100)
|
||||||
state = 0
|
state = 0
|
||||||
latency_info = ""
|
latency_info = ""
|
||||||
if latency > warn:
|
if latency > warn:
|
||||||
if latency > crit:
|
if latency > crit:
|
||||||
state = 2
|
state = 2
|
||||||
latency_info = "(crit above %s)" % crit
|
latency_info = "Latency is %s ms (crit above %s ms)" % (latency, crit)
|
||||||
else:
|
else:
|
||||||
state = 1
|
state = 1
|
||||||
latency_info = "(warn above %s)" % warn
|
latency_info = "Latency is %s ms (warn above %s ms)" % (latency, warn)
|
||||||
else:
|
else:
|
||||||
latency_info = "Latency is %s" % latency
|
latency_info = "Latency is %s ms" % latency
|
||||||
yield state, latency_info, [('Latency', latency, warn, crit)]
|
yield state, latency_info, [('Latency', latency, warn, crit)]
|
||||||
|
|
||||||
check_info['infoblox_aat5_latency'] = {
|
check_info['infoblox_aat5_latency'] = {
|
||||||
|
@ -38,18 +38,18 @@ def check_infoblox_nonaat5_count(item, params, info):
|
|||||||
if params:
|
if params:
|
||||||
warn, crit = params['infoblox_count']
|
warn, crit = params['infoblox_count']
|
||||||
else:
|
else:
|
||||||
warn, crit = (50, 100)
|
warn, crit = (50, 100)
|
||||||
state = 0
|
state = 0
|
||||||
count_info = ""
|
count_info = ""
|
||||||
if count > warn:
|
if count > warn:
|
||||||
if count > crit:
|
if count > crit:
|
||||||
state = 2
|
state = 2
|
||||||
count_info = "(crit above %s)" % crit
|
count_info = "Number of NonAAT5 Requests is %s (crit above %s requests)" % (count, crit)
|
||||||
else:
|
else:
|
||||||
state = 1
|
state = 1
|
||||||
count_info = "(warn above %s)" % warn
|
count_info = "Number of NonAAT5 Requests is %s (warn above %s requests)" % (count, warn)
|
||||||
else:
|
else:
|
||||||
count_info = "Count is is %s" % count
|
count_info = "Number of NonAAT5 Requests is %s" % count
|
||||||
yield state, count_info, [('Count', count, warn, crit)]
|
yield state, count_info, [('Count', count, warn, crit)]
|
||||||
|
|
||||||
check_info['infoblox_nonaat5_count'] = {
|
check_info['infoblox_nonaat5_count'] = {
|
||||||
|
@ -35,22 +35,21 @@ def inventory_infoblox_nonaat5_latency(info):
|
|||||||
|
|
||||||
def check_infoblox_nonaat5_latency(item, params, info):
|
def check_infoblox_nonaat5_latency(item, params, info):
|
||||||
latency=int(info[0][0])
|
latency=int(info[0][0])
|
||||||
print params
|
|
||||||
if params:
|
if params:
|
||||||
warn, crit = params['infoblox_latency']
|
warn, crit = params['infoblox_latency']
|
||||||
else:
|
else:
|
||||||
warn, crit = (50, 100)
|
warn, crit = (50, 100)
|
||||||
state = 0
|
state = 0
|
||||||
latency_info = ""
|
latency_info = ""
|
||||||
if latency > warn:
|
if latency > warn:
|
||||||
if latency > crit:
|
if latency > crit:
|
||||||
state = 2
|
state = 2
|
||||||
latency_info = "(crit above %s)" % crit
|
latency_info = "Latency is %s ms (crit above %s ms)" % (latency, crit)
|
||||||
else:
|
else:
|
||||||
state = 1
|
state = 1
|
||||||
latency_info = "(warn above %s)" % warn
|
latency_info = "Latency is %s ms (warn above %s ms)" % (latency, warn)
|
||||||
else:
|
else:
|
||||||
latency_info = "Latency is %s" % latency
|
latency_info = "Latency is %s ms" % latency
|
||||||
yield state, latency_info, [('Latency', latency, warn, crit)]
|
yield state, latency_info, [('Latency', latency, warn, crit)]
|
||||||
|
|
||||||
check_info['infoblox_nonaat5_latency'] = {
|
check_info['infoblox_nonaat5_latency'] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user