check_mk-check-nfsiostat/web/plugins/perfometer/nfsiostat.py
2018-09-09 17:18:43 +03:00

19 lines
532 B
Python

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