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

HiveOS / IQ Engine: WiFi AP, radio and client polling, health sensors, AH-SMI-MIB fixes (+ core WiFi NULL->0 update fix)

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • Discovery, OS, Poller

    Description

      Summary

      Adds wireless polling for Aerohive / Extreme Networks HiveOS access points (now branded IQ Engine): AP, radio and connected-client data in the WiFi module, plus CPU, memory, temperature and fan from AH-SYSTEM-MIB. The hiveos OS definition already existed but had no wireless or health polling at all.

      While building this, two pre-existing problems were found and fixed, both included in the attached patch:

      • AH-SMI-MIB syntax errors (shipped vendor MIB) that silently broke parsing of AH-INTERFACE-MIB and AH-SYSTEM-MIB.
      • A core WiFi framework bug in includes/polling/wifi.inc.php: a genuine NULL -> 0 field change is never written to the DB. This affects every WiFi vendor module, not just this one. It can be split into its own Bug issue if preferred.

      Patch: 01-hiveos-wifi.patch (attached). Apply from the Observium root with patch -p1 < 01-hiveos-wifi.patch. It was built against trunk SVN BASE and applies cleanly.

      What it adds

      • Hardware/version for current firmware. Extreme rebranded HiveOS to IQ Engine; sysDescr is now <hw>, IQ Engine <ver> build-<hash>, which the existing regex didn't match, so hardware/version were blank. A second sysDescr_regex is added; the old HiveOS one is kept.
      • Health: processor (ahCpuUtilization), mempool (ahMemUtilization), temperature (ahEnvirmentTemp), fan speed (ahEnvirmentFan) and serial (ahSystemSerial), declared in a new includes/definitions/mibs/aerohive.inc.php. device_processor and device_mempool graphs are added to the OS.
      • WiFi module (AP / radios / clients):
        • Each HiveOS device is a standalone AP (not a controller), so a stable synthetic AP index self:<device_id> is used.
        • Radios come from ahRadioAttributeTable (channel, tx power) and ahRadioStatsTable.
        • Client counts and the client/session list come from ahAssociationTable: MAC, hostname, IP, SSID and uptime.
        • Channel utilisation (radio_util / ap_member_util) is derived from ahRadioTxAirtime/ahRadioRxAirtime Counter64 deltas between polls. The previous counter is persisted as an entity attrib, because there is no raw-airtime column in wifi_radios.

      Files

      File Status Purpose
      includes/definitions/mibs/aerohive.inc.php new Registers AH-SYSTEM-MIB / AH-INTERFACE-MIB; processor, mempool, temperature, fan and serial definitions
      includes/definitions/os/extreme.inc.php changed hiveos: IQ Engine sysDescr regex, MIBs, processor/mempool graphs
      includes/discovery/wifi/ah-interface-mib.inc.php new Discovers the AP entry and radios
      includes/polling/wifi/ah-interface-mib.inc.php new Polls AP/radio state, client counts, channel and utilisation
      includes/polling/wifi-sessions/ah-interface-mib.inc.php new Polls the client session list
      includes/entities/wifi.inc.php changed New wifi_field_changed() helper (core fix, see below)
      includes/polling/wifi.inc.php changed Uses wifi_field_changed() in the AP and radio diff loops (core fix)
      mibs/aerohive/AH-SMI-MIB changed Syntax fixes (see below)

      Design notes / gotchas

      • Client interface vs physical radio. A client associates to the VAP/access ifIndex, which is a different SNMP index from the physical radio that ahRadioAttributeTable reports channel/power for. Without handling this, every client-bearing radio had radio_channel = NULL, and the WiFi overview "Band split" dropped all clients into "Other/Unknown". The fix: also walk per-client ahClientChannel, and take a client-bearing radio's channel as the mode of its clients' channels when the radio has no channel row of its own.
      • Client MAC index parsing. ahClientMac is a length-prefixed (not IMPLIED) OCTET STRING index. The walks use OBS_SNMP_ALL_NUMERIC_INDEX and the index parser drops the leading length octet (6.a.b.c.d.e.f). With the default flags the index came back as raw bytes and the MAC parser rejected every row, so client lists stayed at 0.
      • Declarative sensor oid_num. The oid_num values in the sensor definitions must not end in .0: discovery appends .<index> itself, and a double .0.0 OID polls as 0 forever.

      Core fix: NULL -> 0 never written (shared WiFi framework)

      The AP/radio diff loops in includes/polling/wifi.inc.php use loose != on purpose, so a DB string "5" isn't treated as different from PHP int 5. But in PHP 0 != NULL is false, so a genuine NULL -> 0 transition (for example an idle radio's real 0% utilisation) is treated as "unchanged" and the column stays NULL forever.

      wifi_field_changed($new, $old) returns TRUE when exactly one side is NULL, and otherwise falls back to the original loose comparison. The behaviour only changes for that one case.

      AH-SMI-MIB fixes (vendor MIB as shipped)

      • SMI identifiers may not contain underscores: ahAPHiveAP020_ag, ..._n, ..._ac and ..._ax are renamed without the underscore (for example ahAPHiveAP410C_ax becomes ahAPHiveAP410Cax). OIDs are unchanged.
      • AhInterfaceMode: missing commas after ahDual(4) and ahSensor(5), and the hyphenated enum label ahWLAN-Wan becomes ahWlanWan.

      These errors silently stopped net-snmp from loading AH-INTERFACE-MIB and AH-SYSTEM-MIB. Before/after check: snmptranslate -m ALL -Tp .1.3.6.1.4.1.26928.

      Testing

      • Tested on AP3000, AP305C, AP410C and AP510CX running IQ Engine 10.9r1 (multiple builds). CPU/mem/temp/fan, radios, client counts, client sessions and channel utilisation all populate.
      • For already-discovered devices, discovery must be re-run once so the corrected sensor OIDs are stored. Hardware/version come from the OS poller (poller.php -m os), not discovery.
      • php -l clean on all files.

      Known limitations / notes for maintainers

      • Some IQ Engine agents return genError on large GETBULK replies and then temporarily stop answering the radio tables. If that happens, a lower per-device max-repetitions value (or disabling bulk) works around it.
      • HiveOS reports radio interfaces (wifi*) as ethernetCsmacd, not ieee80211. $config['ports']['ignore_errors_iftype'] therefore doesn't match them, and normal radio retry errors show up in the "Port Errors" status panel. Classifying these by ifName/ifType for hiveos might be worth doing upstream.
      • wifi_sessions has no columns for per-client bytes, rates or RSSI, although AH-INTERFACE-MIB exposes them. Adding them would need a schema change, so it is not included.

      Attachments

        Activity

          People

            landy Mike Stupalov
            rebeluca Luca Rebellato
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: