1
0

Added Ericsson RX8200 DVB signal monitoring. Also made some fixes to

perfometer for fans.
This commit is contained in:
Markus Birth 2018-10-11 12:28:10 +02:00
parent ef62e22823
commit dc6a770b23
3 changed files with 68 additions and 12 deletions

View File

@ -2,6 +2,6 @@
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 = 2018.10.11.1
version.min_required = 1.2.8p2
download_url = https://github.com/mbirth/check_mk-plugins

View File

@ -0,0 +1,62 @@
#!/usr/bin/python
# -*- coding: utf-8; py-indent-offset: 4 -*-
# _______ __ _ ____ __
# | | \ | |___ \ / /
# | | \| | __) | / /-,_
# | | |\ |/ __/ /__ _|
# |_______|_| \__|_____| |_|
#
# @author Markus Birth <markus.birth@welt.de>
def inventory_ericsson_rx8200_signal(info):
inventory = []
for inpSel, sigSta, sigLvl, pvb, cn, cnm in info:
inventory.append( (inpSel, None) )
return inventory
def check_ericsson_rx8200_signal(item, params, info):
status = 0
for inpSel, sigSta, sigLvl, pvb, cn, cnm in info:
if inpSel != item:
continue
if sigSta != "LOCKED":
status = 2
msg = "Input {} {} / Level {} / ER {} / C/N {} / Margin {}".format(inpSel, sigSta, sigLvl, pvb, cn, cnm)
if pvb[0] == "<":
pvbFloat = savefloat(pvb[1:])
else:
pvbFloat = savefloat(pvb)
cnFloat = savefloat(cn.split(" ")[0])
cnmFloat = savefloat(cnm.split(" ")[0])
perfdata = [
("Signal_Level", saveint(sigLvl), None, None),
("Error_Ratio", pvbFloat, None, None),
("CN", cnFloat, None, None),
("CN_Margin", cnmFloat, None, None)
]
return (0, msg, perfdata)
return (3, "%s not found in SNMP data." % item)
check_info["ericsson_rx8200_signal"] = {
"check_function" : check_ericsson_rx8200_signal,
"inventory_function" : inventory_ericsson_rx8200_signal,
"service_description" : "DVB Signal %s",
"snmp_info" : (".1.3.6.1.4.1.1773.1.3.208.2.2", [
1, # inputSelect
2, # signalStatus
3, # signalLevel
4, # postViterbiBER
5, # C/N
6, # C/N Margin
]),
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.4.1.1773.1.3.208.1.1.1.0"),
"has_perfdata" : True
}

View File

@ -13,22 +13,16 @@ def perfometer_ericsson_rx8200_fans(row, check_command, perfdata):
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
warn = 1000
crit = 300
if rpm >= crit:
if rpm < crit:
color = "#d23"
elif rpm >= warn:
elif rpm < warn:
color = "#dd2"
else:
color = "#2d3"
return "%i rpm" % rpm, perfometer_linear(100*rpm/crit, color)
return "%i rpm" % rpm, perfometer_linear(100*rpm/10000, color)
perfometers["check_mk-ericsson_rx8200_fans"] = perfometer_ericsson_rx8200_fans