Added ericsson_rx8200.
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
[info]
|
||||||
|
title = Ericsson/Tandberg RX8200 SNMP Checks
|
||||||
|
author = Markus Birth
|
||||||
|
description = SNMP based checks (fans, temperature) for the Ericsson/Tandberg RX8200 IRD.
|
||||||
|
version = 2017.02.07.1
|
||||||
|
version.min_required = 1.2.8p2
|
||||||
|
download_url = https://github.com/mbirth/check_mk-plugins
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# -*- coding: utf-8; py-indent-offset: 4 -*-
|
||||||
|
# _______ __ _ ____ __
|
||||||
|
# | | \ | |___ \ / /
|
||||||
|
# | | \| | __) | / /-,_
|
||||||
|
# | | |\ |/ __/ /__ _|
|
||||||
|
# |_______|_| \__|_____| |_|
|
||||||
|
#
|
||||||
|
# @author Markus Birth <markus.birth@weltn24.de>
|
||||||
|
|
||||||
|
ericsson_rx8200_fans_default_levels = { "lower": (1000, 300) }
|
||||||
|
|
||||||
|
def inventory_ericsson_rx8200_fans(info):
|
||||||
|
inventory = []
|
||||||
|
for fanIndex, fanSpeed in info:
|
||||||
|
inventory.append( (fanIndex, "ericsson_rx8200_fans_default_levels") )
|
||||||
|
return inventory
|
||||||
|
|
||||||
|
def check_ericsson_rx8200_fans(item, params, info):
|
||||||
|
for fanIndex, fanSpeed in info:
|
||||||
|
if fanIndex != item:
|
||||||
|
continue
|
||||||
|
|
||||||
|
return check_fan(saveint(fanSpeed), params)
|
||||||
|
|
||||||
|
return (3, "%s not found in SNMP data." % item)
|
||||||
|
|
||||||
|
check_info["ericsson_rx8200_fans"] = {
|
||||||
|
"check_function" : check_ericsson_rx8200_fans,
|
||||||
|
"inventory_function" : inventory_ericsson_rx8200_fans,
|
||||||
|
"group" : "hw_fans",
|
||||||
|
"service_description" : "Fan %s",
|
||||||
|
"snmp_info" : (".1.3.6.1.4.1.1773.1.3.208.1.1.2.1", [
|
||||||
|
1, # fanIndex
|
||||||
|
2, # fanSpeed
|
||||||
|
]),
|
||||||
|
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.4.1.1773.1.3.208.1.1.1.0"),
|
||||||
|
"includes" : [ "fan.include" ],
|
||||||
|
"has_perfdata" : True
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# -*- coding: utf-8; py-indent-offset: 4 -*-
|
||||||
|
# _______ __ _ ____ __
|
||||||
|
# | | \ | |___ \ / /
|
||||||
|
# | | \| | __) | / /-,_
|
||||||
|
# | | |\ |/ __/ /__ _|
|
||||||
|
# |_______|_| \__|_____| |_|
|
||||||
|
#
|
||||||
|
# @author Markus Birth <markus.birth@weltn24.de>
|
||||||
|
|
||||||
|
ericsson_rx8200_temp_default_levels = { "levels": (45, 60) }
|
||||||
|
|
||||||
|
def inventory_ericsson_rx8200_temp(info):
|
||||||
|
inventory = []
|
||||||
|
inventory.append( ("1", "ericsson_rx8200_temp_default_levels") )
|
||||||
|
return inventory
|
||||||
|
|
||||||
|
def check_ericsson_rx8200_temp(item, params, info):
|
||||||
|
temperature = saveint(info[0][0])
|
||||||
|
return check_temperature(temperature, params, item)
|
||||||
|
|
||||||
|
check_info["ericsson_rx8200_temp"] = {
|
||||||
|
"check_function" : check_ericsson_rx8200_temp,
|
||||||
|
"inventory_function" : inventory_ericsson_rx8200_temp,
|
||||||
|
"group" : "temperature",
|
||||||
|
"service_description" : "Temperature %s",
|
||||||
|
"snmp_info" : (".1.3.6.1.4.1.1773.1.3.208.1.1", [
|
||||||
|
"1.0", # temperature
|
||||||
|
]),
|
||||||
|
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.4.1.1773.1.3.208.1.1.1.0"),
|
||||||
|
"includes" : [ "temperature.include" ],
|
||||||
|
"has_perfdata" : True
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# -*- coding: utf-8; py-indent-offset: 4 -*-
|
||||||
|
# _______ __ _ ____ __
|
||||||
|
# | | \ | |___ \ / /
|
||||||
|
# | | \| | __) | / /-,_
|
||||||
|
# | | |\ |/ __/ /__ _|
|
||||||
|
# |_______|_| \__|_____| |_|
|
||||||
|
#
|
||||||
|
# @author Markus Birth <markus.birth@weltn24.de>
|
||||||
|
|
||||||
|
def perfometer_ericsson_rx8200_fans(row, check_command, perfdata):
|
||||||
|
if len(perfdata) < 1:
|
||||||
|
return "", ""
|
||||||
|
|
||||||
|
rpm = float(perfdata[0][1])
|
||||||
|
if perfdata[0][3]:
|
||||||
|
warn = float(perfdata[0][3])
|
||||||
|
else:
|
||||||
|
warn = 7000
|
||||||
|
if perfdata[0][4]:
|
||||||
|
crit = float(perfdata[0][4])
|
||||||
|
else:
|
||||||
|
crit = 8500
|
||||||
|
|
||||||
|
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-ericsson_rx8200_fans"] = perfometer_ericsson_rx8200_fans
|
||||||
Reference in New Issue
Block a user