perfometer

This commit is contained in:
Marius Pana 2018-09-09 17:18:43 +03:00
parent 0ac0a76307
commit 08b0bf9617
1 changed files with 6 additions and 5 deletions

View File

@ -3,15 +3,16 @@
def perfometer_nfsiostat(row, check_command, perf_data):
for pd in perf_data:
if pd[0] == u'op_s':
busy = float(pd[1])
ops = float(pd[1])
warn = float(pd[3])
crit = float(pd[4])
if busy <= warn:
if ops <= warn:
color = '#90ee90'
elif busy <= crit:
elif ops <= crit:
color = '#ffa500'
else:
color = '#ff6347'
return '%d%%' % busy, perfometer_linear(busy, color)
return '%d op/s' % ops, perfometer_linear(ops, color)
perfometers["check_mk-amavis"] = perfometer_amavis
perfometers["check_mk-nfsiostat"] = perfometer_nfsiostat