NETWAYS / check_akcp_sensorprobe

Icinga check plugin for AKCP sensorprobes with auto-discovery
https://shop.netways.de
GNU General Public License v2.0
1 stars 2 forks source link

Temperature show 0 Degrees on newer AKCPs #3

Closed MarcusCaepio closed 4 years ago

MarcusCaepio commented 4 years ago

Hi @dnsmichi, the plugin showes for one of our AKCP Sensors 2 (actually the newest ones) a Temperature of 0 degrees. In The WebGUI, the correct temperature is shown. As I understand the plugin correctly, you are checking the OID 1.3.6.1.4.1.3854.1.2.2.1.16.1.14.0 which shows a value on older sensors:

snmpget -m all -v1 -c xxxxx <oldpi> 1.3.6.1.4.1.3854.1.2.2.1.16.1.14.0
SNMPv2-SMI::enterprises.3854.1.2.2.1.16.1.14.0 = INTEGER: 229

On the newer one I get

snmpget -m all -v1 -c xxx <newip> 1.3.6.1.4.1.3854.1.2.2.1.16.1.14.0
SNMPv2-SMI::enterprises.3854.1.2.2.1.16.1.14.0 = INTEGER: 0

But asking another OID, seems to give the correct temperature: snmpget -m all -v1 -c xxx <newip> 1.3.6.1.4.1.3854.1.2.2.1.16.1.3.0 SNMPv2-SMI::enterprises.3854.1.2.2.1.16.1.3.0 = INTEGER: 22`

The Firmware for the new one is "sensorProbe2 PoE v2.0 SP2474 080917" The old one for reference is sensorProbe2 v2.0 SP2470 161014

Do you know, if AKCP switched anything here or if our AKCP is just broken? The sensor is a Combined Temperature and Humidity sensor.

Cheers, Marcus

MarcusCaepio commented 4 years ago

Hi Michi, I contacted our supplier about this and he told me, that it seems, AKCP changed the OID structure. I am going to try adjusting the plugin and make a PR, if it works.

dnsmichi commented 4 years ago

Hi @MarcusCaepio, I'm not working anymore at Netways/Icinga. See my announcement with joining GitLab. Not sure who is responsible for the plugins in the future, info(at)netways.de might be an idea.

Cheers, Michael

MarcusCaepio commented 4 years ago

Hi @dnsmichi , I wish you all the best for your new journey!

Thomas-Gelf commented 4 years ago

Hi @MarcusCaepio,

plugin author here. GitHub is the perfect place for your questions, no need to go elsewhere. I wrote this 10 years ago, however I can remember that there have been two different related OIDs, one of them with higher precision.

I do not want to break this plugin for other devices with older firmware, and I'd prefer to keep the higher precision value where available.

Could you please let me know:

Your devices should have been shipped with a MIB file, either on CD or available via Download from the device. Could you please let me have that file?

Thanks, Thomas

MarcusCaepio commented 4 years ago

Hi @Thomas-Gelf , thanks for responding.

whether your older device still works when changing .14 to .3

Yes, they are. I have 7 AKCP Sensorprobe2 with different Firmwares and all are working.

whether (and how) the output (including perfdata) changes for your older device

The output itself changes from Degress with a decimal place to fully rounded Degrees. But htis should be ok, as this value is also shown in the webgui. Thanks for the tip about the Perfdata. It is wrong atm, as it is still divided by 10. I am right now looking at it and edit my PR.

Thomas-Gelf commented 4 years ago

@MarcusCaepio: I'd prefer to use .14 divided by 10 if available, and .3 otherwise. And I'd really love to have a look at your MIB files, eventually there are better hints than just blindly testing for the existence of a specific property.

I would really appreciate it, if you could mail me those files (eventually from two different devices, if available). Related snmpwalk's (starting from 1.3.6.1.4.1.3854) would be fantastic.

MarcusCaepio commented 4 years ago

Hey Tom, I am uploading the mib file, we got from our supplier and a pdf file with the snmp manual. In the manual you can see, that there are also telling to use .16.3.x for the temperature:

The sensorProbe OID groups are as follows:

  1. The first group includes temperature sensors only: SP sensorProbeTempDegree = 1.3.6.1.4.1.3854.1.2.2.1.16.1.3.X sensorProbeTempStatus = 1.3.6.1.4.1.3854.1.2.2.1.16.1.4.X

akcp.zip

I am also uploading 2 walks. Filename = Firmware Version

SP2470_161014.txt SP2474_080917.txt

Thomas-Gelf commented 4 years ago

Thanks a lot, this confirms my assumption. The sensorProbe2 SP2470 161014 offers both sensorProbeTempDegree (.3) and sensorProbeTempDegreeRaw (.14):

SNMPv2-SMI::enterprises.3854.1.2.2.1.16.1.3.0 = INTEGER: 26
SNMPv2-SMI::enterprises.3854.1.2.2.1.16.1.14.0 = INTEGER: 257

Raw value has higher precision, it shows 25.7°, while tempTegree shows 26°.

sensorProbe2 SP2474 080917 has sensorProbeTempDegree only:

SNMPv2-SMI::enterprises.3854.1.2.2.1.16.1.3.0 = INTEGER: 22

Does the web frontend reflect this? Does the newer device show no decimals in the UI? Anyway, given all this, the logic in the Plugin should be:

If you need help with implementing this please let me know.

MarcusCaepio commented 4 years ago

Does the web frontend reflect this? Does the newer device show no decimals in the UI?

Whether the newer, nor the older device shows the temperature with decimals. old one: image new one: image

I am nearly sure, that also the alerting rules inside the sensors are working with full rounded degrees. We had the situation in the past, that the plugin showed e.g. 25.7 but the alert was warning because the warning threshold was 26 and so the akcp sensor itself set it on warning. Imho, based on this, we should maybe work with fully degrees, to have an identical result in the webgui and the plugin. So we can also comprehend, why the sensor itself sets a warning/critical :)

Thomas-Gelf commented 4 years ago

Thanks for all the details! I have no idea why they decided to blur precision, I'm pretty sure that older models showed decimals, that's why I originally started to look for the full precision number via SNMP. Said all this, I'd opt for merging your updated pull request. Thanks again for your effort!

MarcusCaepio commented 4 years ago

My pleasure :) I also don't know, why AKCP changed this. I could imagine, they changed sth. in the temperature sensors themself. If I remember right, I read somewhere, that some specific sensors are not compatible with specific firmwares. Anyway, I'm happy I could help here :)