removed default thresholds
This commit is contained in:
parent
448fd6438d
commit
24905106f0
@ -38,38 +38,19 @@
|
|||||||
#x.x.x.x:/mount/name mounted on /data:
|
#x.x.x.x:/mount/name mounted on /data:
|
||||||
# ...
|
# ...
|
||||||
|
|
||||||
factory_settings["nfsiostat_default_levels"] = {
|
|
||||||
"op_s" : (2500000.00, 2600000.00),
|
|
||||||
"rpc_backlog" : (2500000.00, 2600000.00),
|
|
||||||
"read_ops" : (2500000.00, 2600000.00),
|
|
||||||
"read_b_s" : (2500000.00, 2600000.00),
|
|
||||||
"read_b_op" : (2500000.00, 2600000.00),
|
|
||||||
"read_retrans" : (2500000.0, 2600000.0),
|
|
||||||
"read_avg_rtt_ms" : (2500000.00, 2600000.00),
|
|
||||||
"read_avg_exe_ms" : (2500000.00, 2600000.00),
|
|
||||||
"write_ops_s" : (2500000.00, 2600000.00),
|
|
||||||
"write_b_s" : (2500000.00, 2600000.00),
|
|
||||||
"write_b_op" : (2500000.00, 2600000.00),
|
|
||||||
"write_retrans" : (2500000.0, 2600000.0),
|
|
||||||
"write_avg_rtt_ms" : (2500000.00, 2600000.00),
|
|
||||||
"write_avg_exe_ms" : (2500000.00, 2600000.0),
|
|
||||||
}
|
|
||||||
|
|
||||||
# we can convert once it is clear what the format/standards are
|
|
||||||
# count, (item (name), title, factor, fmt,)
|
|
||||||
param_name = {
|
param_name = {
|
||||||
"0" : ("op_s","Operations", 1, "%.2f/s"),
|
"0" : ("op_s","Operations", 1, "%.2f/s"),
|
||||||
"1" : ("rpc_backlog", "RPC Backlog", 1, "%.2f"),
|
"1" : ("rpc_backlog", "RPC Backlog", 1, "%.2f"),
|
||||||
"2" : ("read_ops", "Read operations", 1, "%.3f/s"),
|
"2" : ("read_ops", "Read operations /s", 1, "%.3f/s"),
|
||||||
"3" : ("read_b_s", "Reads per second", 1000, "%.3fB/s"),
|
"3" : ("read_b_s", "Reads size /s", 1000, "%.3fB/s"),
|
||||||
"4" : ("read_b_op", "Read bytes", 1000, "%.3fB/op"),
|
"4" : ("read_b_op", "Read bytes per operation", 1000, "%.3fB/op"),
|
||||||
"5" : ("read_retrans", "Read Retransmission", 1, "%.1f%%"),
|
"5" : ("read_retrans", "Read Retransmission", 1, "%.1f%%"),
|
||||||
"6" : ("read_retrans", "Read Retransmission", 1, "%.1f%%"),
|
"6" : ("read_retrans", "Read Retransmission", 1, "%.1f%%"),
|
||||||
"7" : ("read_avg_rtt_ms", "Read average RTT", 1000, "%.3f/s",),
|
"7" : ("read_avg_rtt_ms", "Read average RTT", 1000, "%.3f/s",),
|
||||||
"8" : ("read_avg_exe_ms", "Read average EXE", 1000, "%.3f/s",),
|
"8" : ("read_avg_exe_ms", "Read average EXE", 1000, "%.3f/s",),
|
||||||
"9" : ("write_ops_s", "Write operations", 1, "%.3f/s"),
|
"9" : ("write_ops_s", "Write operations /s", 1, "%.3f/s"),
|
||||||
"10" : ("write_b_s", "Writes per second", 1000, "%.3fkB/s"),
|
"10" : ("write_b_s", "Writes size /s", 1000, "%.3fkB/s"),
|
||||||
"11" : ("write_b_op", "Write bytes", 1000, "%.3fB/op"),
|
"11" : ("write_b_op", "Write bytes per operation", 1000, "%.3fB/op"),
|
||||||
"12" : ("write_retrans", "Write Retransmission", 1, "%.1f%%"),
|
"12" : ("write_retrans", "Write Retransmission", 1, "%.1f%%"),
|
||||||
"13" : ("write_retrans", "Write Retransmission", 1, "%.3f%%"),
|
"13" : ("write_retrans", "Write Retransmission", 1, "%.3f%%"),
|
||||||
"14" : ("write_avg_rtt_ms", "Write Average RTT", 1, "%.3f/ms"),
|
"14" : ("write_avg_rtt_ms", "Write Average RTT", 1, "%.3f/ms"),
|
||||||
@ -91,7 +72,7 @@ def parse_nfsiostat(info):
|
|||||||
def inventory_nfsiostat(parsed):
|
def inventory_nfsiostat(parsed):
|
||||||
inventory = []
|
inventory = []
|
||||||
for mountname in parsed.keys():
|
for mountname in parsed.keys():
|
||||||
yield mountname, "nfsiostat_default_levels"
|
yield mountname, {}
|
||||||
|
|
||||||
|
|
||||||
def check_nfsiostat(item, params, parsed):
|
def check_nfsiostat(item, params, parsed):
|
||||||
@ -103,24 +84,20 @@ def check_nfsiostat(item, params, parsed):
|
|||||||
factor = param_name[str(count)][2]
|
factor = param_name[str(count)][2]
|
||||||
fmt = param_name[str(count)][3]
|
fmt = param_name[str(count)][3]
|
||||||
value = float(value)
|
value = float(value)
|
||||||
crit = float(params[item][1])
|
|
||||||
warn = float(params[item][0])
|
if params:
|
||||||
# convert
|
if params.get(item, 0):
|
||||||
value = factor * value
|
crit = float(params[item][1])
|
||||||
# match on item or fmt
|
warn = float(params[item][0])
|
||||||
if item == "read_ops":
|
if value >= crit:
|
||||||
# if fmt == "%.3f/s":
|
perfdata = [ (item, value, warn, crit ) ]
|
||||||
value = value / factor
|
return(2, "%s: %s" % (title, fmt % value), perfdata)
|
||||||
|
elif value >= warn:
|
||||||
if value >= crit:
|
perfdata = [ (item, value, warn, crit ) ]
|
||||||
perfdata = [ (item, value, warn, crit ) ]
|
return(1, "%s: %s" % (title, fmt % value), perfdata)
|
||||||
return(2, "%s: %s" % (title, fmt % value), perfdata)
|
|
||||||
elif value >= warn:
|
perfdata = [ (item, value ) ]
|
||||||
perfdata = [ (item, value, warn, crit ) ]
|
return(0, "%s: %s" % (title, fmt % value), perfdata)
|
||||||
return(1, "%s: %s" % (title, fmt % value), perfdata)
|
|
||||||
else:
|
|
||||||
perfdata = [ (item, value, warn, crit ) ]
|
|
||||||
return(0, "%s: %s" % (title, fmt % value), perfdata)
|
|
||||||
|
|
||||||
for mountpoint, values in parsed.items():
|
for mountpoint, values in parsed.items():
|
||||||
# We have duplicate items at index 5 and 12. We exclude the dupes here
|
# We have duplicate items at index 5 and 12. We exclude the dupes here
|
||||||
@ -138,7 +115,5 @@ check_info['nfsiostat'] = {
|
|||||||
'check_function' : check_nfsiostat,
|
'check_function' : check_nfsiostat,
|
||||||
'service_description' : 'NFS IO stats %s',
|
'service_description' : 'NFS IO stats %s',
|
||||||
'group' : 'nfsiostats',
|
'group' : 'nfsiostats',
|
||||||
'default_levels_variable': 'nfsiostat_default_levels',
|
|
||||||
'has_perfdata' : True,
|
'has_perfdata' : True,
|
||||||
#'includes' : ['size_trend.include', 'df.include']
|
|
||||||
}
|
}
|
@ -10,75 +10,75 @@ register_check_parameters(
|
|||||||
Tuple(
|
Tuple(
|
||||||
title=_("Operations"),
|
title=_("Operations"),
|
||||||
elements=[
|
elements=[
|
||||||
Float(title=_("Warning at"), default_value=70.00, unit="1/s"),
|
Float(title=_("Warning at"), default_value=None, unit="1/s"),
|
||||||
Float(title=_("Critical at"), default_value=100.00, unit="1/s"),
|
Float(title=_("Critical at"), default_value=None, unit="1/s"),
|
||||||
])),
|
])),
|
||||||
("rpc_backlog",
|
("rpc_backlog",
|
||||||
Tuple(
|
Tuple(
|
||||||
title=_("RPC Backlog"),
|
title=_("RPC Backlog"),
|
||||||
elements=[
|
elements=[
|
||||||
Float(title=_("Warning below"), default_value=70.00, unit="queue"),
|
Float(title=_("Warning below"), default_value=None, unit="queue"),
|
||||||
Float(title=_("Critical below"), default_value=100.00, unit="queue"),
|
Float(title=_("Critical below"), default_value=None, unit="queue"),
|
||||||
])),
|
])),
|
||||||
("read_ops",
|
("read_ops",
|
||||||
Tuple(
|
Tuple(
|
||||||
title=_("Read Operations"),
|
title=_("Read Operations /s"),
|
||||||
elements=[
|
elements=[
|
||||||
Float(title=_("Warning at"), default_value=150.000, unit="1/s"),
|
Float(title=_("Warning at"), default_value=None, unit="1/s"),
|
||||||
Float(title=_("Critical at"), default_value=200.000, unit="1/s"),
|
Float(title=_("Critical at"), default_value=None, unit="1/s"),
|
||||||
])),
|
])),
|
||||||
("read_b_s",
|
("read_b_s",
|
||||||
Tuple(
|
Tuple(
|
||||||
title=_("Read Bytes"),
|
title=_("Reads size /s"),
|
||||||
elements=[
|
elements=[
|
||||||
Float(title=_("Warning at"), default_value=200.000, unit="bytes/s"),
|
Float(title=_("Warning at"), default_value=None, unit="bytes/s"),
|
||||||
Float(title=_("Critical at"), default_value=250.000, unit="bytes/s"),
|
Float(title=_("Critical at"), default_value=None, unit="bytes/s"),
|
||||||
])),
|
])),
|
||||||
("read_b_op",
|
("read_b_op",
|
||||||
Tuple(
|
Tuple(
|
||||||
title=_("Read kB/op"),
|
title=_("Read bytes per operation"),
|
||||||
elements=[
|
elements=[
|
||||||
Float(title=_("Warning at"), default_value=200.000, unit="bytes/op"),
|
Float(title=_("Warning at"), default_value=None, unit="bytes/op"),
|
||||||
Float(title=_("Critical at"), default_value=250.000, unit="bytes/op"),
|
Float(title=_("Critical at"), default_value=None, unit="bytes/op"),
|
||||||
])),
|
])),
|
||||||
("read_retrans",
|
("read_retrans",
|
||||||
Tuple(
|
Tuple(
|
||||||
title=_("Read Retransmissions"),
|
title=_("Read Retransmissions"),
|
||||||
elements=[
|
elements=[
|
||||||
Percentage(title=_("Warning at"), default_value=10.0),
|
Percentage(title=_("Warning at"), default_value=None),
|
||||||
Percentage(title=_("Critical at"), default_value=20.0),
|
Percentage(title=_("Critical at"), default_value=None),
|
||||||
])),
|
])),
|
||||||
("read_avg_rtt_ms",
|
("read_avg_rtt_ms",
|
||||||
Tuple(
|
Tuple(
|
||||||
title=_("Read Average RTT (ms)"),
|
title=_("Read Average RTT (ms)"),
|
||||||
elements=[
|
elements=[
|
||||||
Float(title=_("Warning at"), default_value=150.000, unit="ms"),
|
Float(title=_("Warning at"), default_value=None, unit="ms"),
|
||||||
Float(title=_("Critical at"), default_value=200.000, unit="ms"),
|
Float(title=_("Critical at"), default_value=None, unit="ms"),
|
||||||
])),
|
])),
|
||||||
("read_avg_exe_ms",
|
("read_avg_exe_ms",
|
||||||
Tuple(
|
Tuple(
|
||||||
title=_("Read Average Executions (ms)"),
|
title=_("Read Average Executions (ms)"),
|
||||||
elements=[
|
elements=[
|
||||||
Float(title=_("Warning at"), default_value=15.000, unit="ms"),
|
Float(title=_("Warning at"), default_value=None, unit="ms"),
|
||||||
Float(title=_("Critical at"), default_value=16.000, unit="ms"),
|
Float(title=_("Critical at"), default_value=None, unit="ms"),
|
||||||
])),
|
])),
|
||||||
("write_ops_s",
|
("write_ops_s",
|
||||||
Tuple(
|
Tuple(
|
||||||
title=_("Write Operations/s"),
|
title=_("Write Operations/s"),
|
||||||
elements=[
|
elements=[
|
||||||
Float(title=_("Warning at"), default_value=15.000, unit="1/s"),
|
Float(title=_("Warning at"), default_value=None, unit="1/s"),
|
||||||
Float(title=_("Critical at"), default_value=16.000, unit="1/s"),
|
Float(title=_("Critical at"), default_value=None, unit="1/s"),
|
||||||
])),
|
])),
|
||||||
("write_b_s",
|
("write_b_s",
|
||||||
Tuple(
|
Tuple(
|
||||||
title=_("Write Bytes"),
|
title=_("Write size /s"),
|
||||||
elements=[
|
elements=[
|
||||||
Float(title=_("Warning at"), default_value=200.000, unit="bytes/s"),
|
Float(title=_("Warning at"), default_value=200.000, unit="bytes/s"),
|
||||||
Float(title=_("Critical at"), default_value=250.000, unit="bytes/s"),
|
Float(title=_("Critical at"), default_value=250.000, unit="bytes/s"),
|
||||||
])),
|
])),
|
||||||
("write_b_op",
|
("write_b_op",
|
||||||
Tuple(
|
Tuple(
|
||||||
title=_("Write B/s"),
|
title=_("Write bytes per operation"),
|
||||||
elements=[
|
elements=[
|
||||||
Float(title=_("Warning at"), default_value=200.000, unit="bytes/s"),
|
Float(title=_("Warning at"), default_value=200.000, unit="bytes/s"),
|
||||||
Float(title=_("Critical at"), default_value=250.000, unit="bytes/s"),
|
Float(title=_("Critical at"), default_value=250.000, unit="bytes/s"),
|
||||||
|
Loading…
Reference in New Issue
Block a user