netgear_readynas: Add perfometers.
This commit is contained in:
parent
6adf530b70
commit
b7201cf590
@ -2,6 +2,6 @@
|
||||
title = Netgear ReadyNAS SNMP Checks
|
||||
author = Markus Birth
|
||||
description = SNMP based checks for the Netgear ReadyNAS.
|
||||
version = 2016.08.23.1
|
||||
version = 2017.12.05.1
|
||||
version.min_required = 1.2.8p2
|
||||
download_url = https://github.com/mbirth/check_mk-plugins
|
||||
|
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8; py-indent-offset: 4 -*-
|
||||
# _______ __ _ ____ __
|
||||
# | | \ | |___ \ / /
|
||||
# | | \| | __) | / /-,_
|
||||
# | | |\ |/ __/ /__ _|
|
||||
# |_______|_| \__|_____| |_|
|
||||
#
|
||||
# @author Markus Birth <markus.birth@weltn24.de>
|
||||
|
||||
def perfometer_netgear_readynas_fan(row, check_command, perfdata):
|
||||
if len(perfdata) < 1:
|
||||
return "", ""
|
||||
|
||||
rpm = float(perfdata[0][1])
|
||||
warn = float(perfdata[0][3])
|
||||
crit = float(perfdata[0][4])
|
||||
|
||||
if rpm >= crit:
|
||||
color = "#d23"
|
||||
elif rpm >= warn:
|
||||
color = "#dd2"
|
||||
else:
|
||||
color = "#2d3"
|
||||
|
||||
return "%i rpm" % rpm, perfometer_linear(100*rpm/crit, color)
|
||||
|
||||
perfometers["check_mk-netgear_readynas_fan"] = perfometer_netgear_readynas_fan
|
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8; py-indent-offset: 4 -*-
|
||||
# _______ __ _ ____ __
|
||||
# | | \ | |___ \ / /
|
||||
# | | \| | __) | / /-,_
|
||||
# | | |\ |/ __/ /__ _|
|
||||
# |_______|_| \__|_____| |_|
|
||||
#
|
||||
# @author Markus Birth <markus.birth@weltn24.de>
|
||||
|
||||
def perfometer_netgear_readynas_temp(row, check_command, perfdata):
|
||||
if len(perfdata) < 1:
|
||||
return "", ""
|
||||
|
||||
tcur = savefloat(perfdata[0][1])
|
||||
tmax = savefloat(perfdata[0][6])
|
||||
|
||||
return "%i℃" % tcur, perfometer_linear(tcur*100/tmax, "#f82")
|
||||
|
||||
perfometers["check_mk-netgear_readynas_temp"] = perfometer_netgear_readynas_temp
|
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8; py-indent-offset: 4 -*-
|
||||
# _______ __ _ ____ __
|
||||
# | | \ | |___ \ / /
|
||||
# | | \| | __) | / /-,_
|
||||
# | | |\ |/ __/ /__ _|
|
||||
# |_______|_| \__|_____| |_|
|
||||
#
|
||||
# @author Markus Birth <markus.birth@weltn24.de>
|
||||
|
||||
perfometers["check_mk-netgear_readynas_volume"] = perfometer_check_mk_df
|
Reference in New Issue
Block a user