Hi,
cmk --debug -vvll doesn’t show any errors.
However, it seems I managed to pinpoint the exact place which causes me problems. It’s brocade_sfp check, and in my case problem lies with “input_signal_power_dbm” parameter. It seems that different switches report different values via SNMP when there is no light in particular port. In some cases, when wato works OK, the values are simply very low (negative with big absolute value, like -30 or -40). In the problematic cases SNMP reports value as “-inf” . E.g.,
snmpwalk -v2c -c public .1.3.6.1.4.1.1588.2.1.1.1.28.1.1.4
SNMPv2-SMI::enterprises.1588.2.1.1.1.28.1.1.4.16.0.0.5.51.59.39.108.0.0.0.0.0.0.0.0.1 = STRING: "-inf "
SNMPv2-SMI::enterprises.1588.2.1.1.1.28.1.1.4.16.0.0.5.51.59.39.108.0.0.0.0.0.0.0.0.2 = STRING: "-inf "
SNMPv2-SMI::enterprises.1588.2.1.1.1.28.1.1.4.16.0.0.5.51.59.39.108.0.0.0.0.0.0.0.0.3 = STRING: "-inf "
SNMPv2-SMI::enterprises.1588.2.1.1.1.28.1.1.4.16.0.0.5.51.59.39.108.0.0.0.0.0.0.0.0.4 = STRING: "-inf "
SNMPv2-SMI::enterprises.1588.2.1.1.1.28.1.1.4.16.0.0.5.51.59.39.108.0.0.0.0.0.0.0.0.5 = STRING: "-4.5 "
SNMPv2-SMI::enterprises.1588.2.1.1.1.28.1.1.4.16.0.0.5.51.59.39.108.0.0.0.0.0.0.0.0.6 = STRING: "-2.4 "
And this “-inf” causes problems. To be more precise, check_mk_local_automation() function in share/check_mk/web/htdocs/watolib.py receives output from check_mk --automation command and then calls ast.literal_eval(outdata) on that output. The problematic output looks like
(‘new’, ‘brocade_sfp’, ‘brocade_sfp’, u’ISL PORT_NAME’, {}, {}, u’SFP 35 ISL PORT_NAME’, 0, u’Rx: -inf dBm, Tx: -5.60 dBm, current: 0.01 A, voltage: 3.31 V’, [(‘input_signal_power_dbm’, -inf), (‘output_signal_power_dbm’, -5.6), (‘current’, 0.006372), (‘voltage’, 3.3051999999999997)])
It’s ast.py which complains about this -inf as it expects number after binary operator, but receives string.
Sounds like a bug to me. SNMP reports value as a string (sometimes its a number, sometimes it’s real string), yet code uses value as it was a number.
Regards,
Marius
···
On Tue, Apr 2, 2019 at 10:31 PM Andreas Döhler andreas.doehler@gmail.com wrote:
Hi Marius,
what you can check is a “cmk --debug -vvII ” on the command
line. If there is a real error inside the checks you will get it
there.
What i think that the problem comes from is binary data inside the
SNMP response from the Brocade device.
It saw something like this before.
Best regards
Andreas
Am Di., 2. Apr. 2019 um 14:05 Uhr schrieb Marius Masalas m.masalas@gmail.com:
Hi,
I have a bunch of Brocade SAN switches I’d like to monitor via SNMP. I’ve added most of them successfuly via wato, but faced problems with few others. When adding these problematic ones an error is returned during discovery, telling me
MKGeneralException: Error running check_mk --automation try-inventory – @noscan @raiseerrors SERVERNAME. Invalid output from webservice (malformed string):
What follows, is an output from various SNMP checks. The string looks OK to me, like normal Python array of tuples (something around 290 elements), filled with results of different snmp variables. I tried to run “check_mk --automation try-inventory – @noscan @raiseerrors SERVERNAME” by hand from shell, but got only empty array as output. I assume it wasn’t correct way to test the check.
Can anyone point me how to debug such snmp checks. I’d like to find out which part of the output is causing me troubles.
Thanks,
Marius
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
Manage your subscription or unsubscribe
https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en