Fix bug with ignoring multiple controllers.
This commit is contained in:
parent
cc203d3bcb
commit
6adf530b70
@ -2,6 +2,6 @@
|
||||
title = Lynx RCT5023g frame controller
|
||||
author = Markus Birth
|
||||
description = SNMP based checks (fans, PSUs, system status) for the Lynx RCT5023g frame controller.
|
||||
version = 2016.07.06.1
|
||||
version = 2017.12.04.1
|
||||
version.min_required = 1.2.8p2
|
||||
download_url = https://github.com/mbirth/check_mk-plugins
|
||||
|
@ -11,14 +11,16 @@
|
||||
def inventory_lynx_rct5023g_fan(info):
|
||||
inventory = []
|
||||
for OID_END, name, label, f1name, f2name, f3name, f1stat, f2stat, f3stat in info:
|
||||
inventory.append( (name, None) )
|
||||
sub_oid = OID_END.split(".")[5]
|
||||
inventory.append( (sub_oid + " " + name, None) )
|
||||
return inventory
|
||||
|
||||
def check_lynx_rct5023g_fan(item, _no_params, info):
|
||||
states = [ "ok", "fail", "missing" ]
|
||||
status = 0
|
||||
for OID_END, name, label, f1name, f2name, f3name, f1stat, f2stat, f3stat in info:
|
||||
if item != name:
|
||||
sub_oid = OID_END.split(".")[5]
|
||||
if item != sub_oid + " " + name:
|
||||
continue
|
||||
|
||||
f1stat = states[int(f1stat)]
|
||||
|
@ -11,13 +11,15 @@
|
||||
def inventory_lynx_rct5023g_power(info):
|
||||
inventory = []
|
||||
for OID_END, name, label, p1name, p1stat, p1volt, p1temp, p2name, p2stat, p2volt, p2temp in info:
|
||||
inventory.append( (name, None) )
|
||||
sub_oid = OID_END.split(".")[5]
|
||||
inventory.append( (sub_oid + " " + name, None) )
|
||||
return inventory
|
||||
|
||||
def check_lynx_rct5023g_power(item, _no_params, info):
|
||||
status = 0
|
||||
for OID_END, name, label, p1name, p1stat, p1volt, p1temp, p2name, p2stat, p2volt, p2temp in info:
|
||||
if item != name:
|
||||
sub_oid = OID_END.split(".")[5]
|
||||
if item != sub_oid + " " + name:
|
||||
continue
|
||||
|
||||
p1volt = savefloat(p1volt)/10
|
||||
|
@ -11,14 +11,16 @@
|
||||
def inventory_lynx_rct5023g_state(info):
|
||||
inventory = []
|
||||
for OID_END, name, label, color, text in info:
|
||||
inventory.append( (name, None) )
|
||||
sub_oid = OID_END.split(".")[5]
|
||||
inventory.append( (sub_oid + " " + name, None) )
|
||||
return inventory
|
||||
|
||||
def check_lynx_rct5023g_state(item, _no_params, info):
|
||||
ledColors = [ "unknown", "black", "green", "yellow", "red" ]
|
||||
status = 0
|
||||
for OID_END, name, label, color, text in info:
|
||||
if item != name:
|
||||
sub_oid = OID_END.split(".")[5]
|
||||
if item != sub_oid + " " + name:
|
||||
continue
|
||||
|
||||
color = int(color)
|
||||
|
Reference in New Issue
Block a user