Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-5359

generex-ups: discovery sysDescr regex does not match multi-word agent names ("Jovy Atlas SNMP Agent")

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • None
    • None
    • Default

    Description

      A Jovy Atlas UPS (model JOVYCUBE-T4S) with a fully working UPS-MIB agent is detected as os "generic", so no UPS sensors are discovered.

      Device

      sysObjectID: .1.3.6.1.2.1.33
      sysDescr:    Jovy Atlas SNMP Agent
      UPS-MIB::upsIdentManufacturer.0 = STRING: Jovy Atlas
      UPS-MIB::upsIdentModel.0 = STRING: JOVYCUBE-T4S
      UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2)
      UPS-MIB::upsOutputNumLines.0 = INTEGER: 3
      UPS-MIB::upsOutputPower.1 = INTEGER: 6490 Watts
      

      Cause
      In includes/definitions/os/generex.inc.php the discovery rule for generex-ups (and generex-ats) uses

      'sysDescr' => '/^(The )?\w\S+ SNMP Agent/',

      This only allows a single word before "SNMP Agent". "Jovy Atlas SNMP Agent" has two words, so the rule never matches.

      Suggested fix

      'sysDescr' => '/^(The )?[\w ]+? SNMP Agent/',

      (or an explicit sysDescr entry for Jovy Atlas).

      Workaround (verified)

      $config['os']['generex-ups']['sysDescr'][] = '/^Jovy Atlas SNMP Agent/';

      After rediscovery the device is generex-ups and all UPS-MIB sensors (input/output per phase, battery, runtime, load) are discovered.

      Observium version: trunk r15538

      Attachments

        Issue Links

          Activity

            People

              landy Mike Stupalov
              FloMeyer Florian Meyer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: