lausser / check_ups_health

A plugin (monitoring-plugin, not nagios-plugin, see also http://is.gd/PP1330) for uninterruptible power supplies.
GNU General Public License v2.0
7 stars 7 forks source link

CS141 shows 999C battery temp if no sensor exists #19

Closed dbecker1234 closed 2 years ago

dbecker1234 commented 2 years ago

Hi,

we have a Woehrle WISUS WP-T UPS (german manufacturer) with a Generex CS141 management card and without a temperature sensor (batteries are stored separately from the UPS chassis). Unfortunately the card is showing 999°C temperature both in the web interface and SNMP output:

snmpwalk -v2c -c public a.b.c.d .1.3.6.1.2.1.33.1.2.7.0
iso.3.6.1.2.1.33.1.2.7.0 = INTEGER: 999
[BATTERY]
upsBatteryTemperature: 999
upsBatteryCurrent: -0.4
upsOutputFrequency: 50
upsSecondsOnBattery: 0
upsBatteryVoltage: 273
upsEstimatedChargeRemaining: 100
upsBatteryStatus: batteryNormal
upsEstimatedMinutesRemaining: 40
info: battery voltage is 273 VDC

CRITICAL - temperature is 999.00C, unit is not on battery power, capacity is 100.00%, output load1 28.00%, output load2 28.00%, output load3 45.00%

Since this is not a realistic value, we did extend the filter in "Classes/UPS/Components/BatterySubsystem.pm":

($self->{upsBatteryTemperature} < -40 ||
      $self->{upsBatteryTemperature} == 2147483647);

replaced with

($self->{upsBatteryTemperature} < -40 ||
      $self->{upsBatteryTemperature} == 999 ||
      $self->{upsBatteryTemperature} == 2147483647);

Maybe you want also put it into upstream (or it helps at least someone else).

Nevertheless, thanks for the script!

lausser commented 2 years ago

Sollte passen. Danke für den Hinweis.