From 985e3533dfdd57fa659c04ce248b3062f1065765 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Wed, 21 Jan 2026 17:25:48 -0600 Subject: [PATCH] feat: add additional ePMP sensors matching LibreNMS Add all sensors that LibreNMS Epmp.php collects: - GPS tracked/visible satellites - Transmit power - Channel width - Network entry attempts/success/auth failures --- lib/towerops/snmp/profiles/dynamic.ex | 69 +++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/lib/towerops/snmp/profiles/dynamic.ex b/lib/towerops/snmp/profiles/dynamic.ex index f75cd748..9fea6ede 100644 --- a/lib/towerops/snmp/profiles/dynamic.ex +++ b/lib/towerops/snmp/profiles/dynamic.ex @@ -548,9 +548,11 @@ defmodule Towerops.Snmp.Profiles.Dynamic do end # ePMP wireless OID definitions (reused for discovery and debug data) + # Mirrors LibreNMS/OS/Epmp.php discoverWireless* and pollOS methods defp epmp_wireless_oid_defs do [ - # RSSI in dBm + # === Wireless sensors (from discoverWireless* methods) === + # RSSI in dBm (SM only - will be "No Such Instance" on AP) %{ oid: "1.3.6.1.4.1.17713.21.1.2.3.0", sensor_type: "rssi", @@ -558,7 +560,7 @@ defmodule Towerops.Snmp.Profiles.Dynamic do sensor_unit: "dBm", sensor_divisor: 1 }, - # SNR in dB + # SNR in dB (SM only - will be "No Such Instance" on AP) %{ oid: "1.3.6.1.4.1.17713.21.1.2.18.0", sensor_type: "snr", @@ -574,11 +576,70 @@ defmodule Towerops.Snmp.Profiles.Dynamic do sensor_unit: "MHz", sensor_divisor: 1 }, - # Connected clients count + # Connected clients count (AP only) %{ oid: "1.3.6.1.4.1.17713.21.1.2.10.0", sensor_type: "clients", - sensor_descr: "Clients", + sensor_descr: "Connected Clients", + sensor_unit: "", + sensor_divisor: 1 + }, + # === GPS sensors (from pollOS) === + # GPS Tracked Satellites + %{ + oid: "1.3.6.1.4.1.17713.21.1.2.64.0", + sensor_type: "count", + sensor_descr: "GPS Tracked Satellites", + sensor_unit: "", + sensor_divisor: 1 + }, + # GPS Visible Satellites + %{ + oid: "1.3.6.1.4.1.17713.21.1.2.65.0", + sensor_type: "count", + sensor_descr: "GPS Visible Satellites", + sensor_unit: "", + sensor_divisor: 1 + }, + # === Radio settings === + # Transmit Power in dBm + %{ + oid: "1.3.6.1.4.1.17713.21.1.2.5.0", + sensor_type: "power", + sensor_descr: "Transmit Power", + sensor_unit: "dBm", + sensor_divisor: 1 + }, + # Channel Width in MHz + %{ + oid: "1.3.6.1.4.1.17713.21.1.1.20.0", + sensor_type: "frequency", + sensor_descr: "Channel Width", + sensor_unit: "MHz", + sensor_divisor: 1 + }, + # === Network entry stats (from pollOS) === + # Network Entry Attempts + %{ + oid: "1.3.6.1.4.1.17713.21.2.1.33.0", + sensor_type: "count", + sensor_descr: "Network Entry Attempts", + sensor_unit: "", + sensor_divisor: 1 + }, + # Network Entry Success + %{ + oid: "1.3.6.1.4.1.17713.21.2.1.34.0", + sensor_type: "count", + sensor_descr: "Network Entry Success", + sensor_unit: "", + sensor_divisor: 1 + }, + # Authentication Failures + %{ + oid: "1.3.6.1.4.1.17713.21.2.1.35.0", + sensor_type: "count", + sensor_descr: "Auth Failures", sensor_unit: "", sensor_divisor: 1 }