Adding OIDs for HiveOS

Looking to get pointed in the right direction to add some graphing for Aerohive Wireless APs.

Let’s start with these:

ahRadioTxAirtime - .1.3.6.1.4.1.26928.1.1.1.2.1.3.1.22
ahRadioRxAirtime - .1.3.6.1.4.1.26928.1.1.1.2.1.3.1.23

These are both in the AH-INTERFACE-MIB

Right now in /opt/librenms/includes/definitions/discovery we have hiveos-wireless.yaml:

mib: AH-SYSTEM-MIB
modules:
    mempools:
        data:
            -
                percent_used: AH-SYSTEM-MIB::ahMemUtilization
    os:
        sysDescr_regex: '/^(?<hardware>.*), HiveOS (?<version>.*)$/'
        hardware: AH-SYSTEM-MIB::ahDeviceMode.0
        serial: AH-SYSTEM-MIB::ahSystemSerial.0
        version: AH-SYSTEM-MIB::ahFirmwareVersion.0
        version_regex: '/^(HiveOS )?(?<version>.*)/'
    sensors:
        temperature:
            data:
                -
                    oid: ahSystem
                    value: ahEnvirmentTemp
                    num_oid: '.1.3.6.1.4.1.26928.1.2.10.{{ $index }}'
                    index: 0
                    descr: 'Internal Temperature'

And in /opt/librenms/includes/definitions:

os: hiveos-wireless
text: 'Aerohive HiveOS'
type: wireless
icon: aerohive
mib_dir: aerohive
over:
    - { graph: device_bits, text: Traffic }
    - { graph: device_processor, text: 'CPU Usage' }
    - { graph: device_wireless_clients, text: 'Wifi Clients' }
discovery:
    -
        sysDescr_regex:
            - '/^(Hive)*AP[\w]+(?:_n)?, HiveOS/'

Is this what I would want in /opt/librenms/includes/definitions/discovery/hiveos-wireless.yaml?:

mib: AH-SYSTEM-MIB:AH-INTERFACE-MIB
modules:
    mempools:
        data:
            -
                percent_used: AH-SYSTEM-MIB::ahMemUtilization
    os:
        sysDescr_regex: '/^(?<hardware>.*), HiveOS (?<version>.*)$/'
        hardware: AH-SYSTEM-MIB::ahDeviceMode.0
        serial: AH-SYSTEM-MIB::ahSystemSerial.0
        version: AH-SYSTEM-MIB::ahFirmwareVersion.0
        version_regex: '/^(HiveOS )?(?<version>.*)/'
    sensors:
        temperature:
            data:
                -
                    oid: ahSystem
                    value: ahEnvirmentTemp
                    num_oid: '.1.3.6.1.4.1.26928.1.2.10.{{ $index }}'
                    index: 0
                    descr: 'Internal Temperature'

		count:
			data:
				-
				oid: ahRadioTxAirtime
				value: ahRadioTxAirtime
				num_oid: .1.3.6.1.4.1.26928.1.1.1.2.1.3.1.22.{{ $index }}
				descr: Radio Transmit Airtime {{ $index }}
				index: ahRadioTxAirtime.{{ $index }}
				-
				oid: ahRadioRxAirtime
				value: ahRadioRxAirtime
				num_oid: .1.3.6.1.4.1.26928.1.1.1.2.1.3.1.23.{{ $index }}
				descr: Radio Receive Airtime {{ $index }}
				index: ahRadioRxAirtime.{{ $index }}

Running a discovery debug and not seeing any reference to the oids that I added. Must be missing something with syntax or is there somewhere else that I should be adding the OIDs that I want to graph?

OK… some progress if only to discover that this does not produce what I want.

I’m guessing that my formatting was the original issue and I am now seeing a #Count sensor with the current TX and RX total airtimes for wifi0 and wifi1. Which is definitely not what I want.

Here… in a nutshell is what I am hoping to accomplish:

  1. Poll ahRadioTXAirtime and ahRadioRXAirtime (in my case for wifi0 and wifi1) and store the deltas in rrd.
  2. Graph airtime as a % by:
    • Add TX and RX deltas to get total microseconds for polling period.
    • Divide by 1,000,000 to convert to seconds
    • Divide the result by the number of seconds in the polling period (default 300) and multiply by 100 to get percentage.
    • Graph that result.

Thoughts?

Hello
It is not possible, using YAML, to create “complex” graphs based on more than 1 variable. So you’ll be able to create TX airtime (doing all the maths you describe) and RX airtime (same) as 2 different graphs.
Doing one graph with both is possible, but will require PHP code.
Bye

Thank you for the response. I admit at this time that I am not exactly sure where I should be adding code to pull this data.

Recap…

I know the OIDs.
snmpget pulls a cumulative value for each. It is a number that represents airtime in microseconds.
So I need to poll that oid every 300 seconds and produce a delta, then do the math I described above.

There are already “hiveos-wireless.yaml” files in includes/definitions and includes/definitions/discovery, but most of the code I see there relates to sensor data.

There is also a HiveosWireless.php file in LibreNMS/OS that I tinkered with, but again I can pull the values (I used the ‘utilization’ option) but the graph is of the raw values pulled… not a delta.

Any hints on where to go with this?

This topic was automatically closed 186 days after the last reply. New replies are no longer allowed.