Owner request: finding where a host is plugged in from a MAC or IP is a must,
and BGP peer monitoring is wanted.
L2 job (internal/l2): a job of its own, off the 60 s poll path (its sessions
are path "l2"), walks BRIDGE-MIB, Q-BRIDGE-MIB, CISCO-VTP-MIB (a per-VLAN
context walk, enabled by the cisco-ios profile flag l2.per_vlan_context, not by
detection) and the IP-MIB neighbour tables (IPv4 ARP and IPv6 ND, IPv4-only
fallback) every l2.interval, with its own concurrency cap and a per-device
deadline. It yields to the poller like the rollup job, and a device that times
out is skipped for the cycle, counted and named on /poller/health. Migration 14
adds fdb_entries, arp_entries, vlans and l2_walks with first/last-seen history,
batched upserts, daily pruning by last_seen (l2.keep) and backup coverage.
API (additive): /l2/search ranks edge ports first (a port is an uplink above
l2.edge_max_macs MACs, with an LLDP neighbour, or as a LAG), plus the device
fdb/arp/l2/l2-ports tables and /interfaces/{id}/macs; vendor and mac_kind are
computed at query time from the optional registry.
BGP: profiles label peer rows by decoding the table index (index_label.layout),
so each peer, IPv4 or IPv6, is one component whatever MIB feeds it; AS, local
AS, router id and description are component attributes, never labels.
CISCO-BGP4 (cisco-ios, cisco-nxos), Juniper BGP4-V2 and Arista BGP4V2 replace
the optional generic BGP4-MIB metrics, which edgeos, fortigate, pfsense and vyos
switch on. /bgp/peers lists sessions down first. The built-in rule
bgp_peer_down (critical, not established for 2 minutes) fires only where a
policy binds it; its notification names the peer's AS and description.
Fixtures are generated (Q-BRIDGE with IPv4/IPv6 neighbours, BRIDGE-MIB only,
Cisco per-VLAN contexts via a new simagent contexts feature) and checked
against real LibreNMS recordings. DEVIATIONS 50-55 record the departures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T4PdJUPrakM8fHvN8jYv2x
9.1 KiB
Collection coverage
What the spec's "What to collect, by device class" table (docs/spec/spec.md) asks for, against what the shipped
profiles in profiles/ collect today. A metric listed here is polled, stored raw and shown on a device tab (every
non-interface metric names a category; the orphan test in internal/profile/present_test.go enforces it). Gaps are
stated plainly; nothing here is promised that is not collected.
Legend: yes collected and shown; partial some of it; no not collected.
| Class | Spec item | Status | Profile and metric |
|---|---|---|---|
| Every device | sysUpTime | yes | generic: sysUpTime, hrSystemUptime |
| Every device | hrProcessorLoad per core | yes | generic: hrProcessorLoad |
| Every device | hrStorage size/used per filesystem and RAM | yes | generic: hrStorageUsed / hrStorageSize x hrStorageAllocationUnits (bytes, percent bar) |
| Every device | memTotalReal / memAvailReal (UCD) | yes | generic: memTotalReal, memAvailReal |
| Servers | UCD load average | yes | linux-netsnmp, ubiquiti-edgeos: laLoadInt |
| Servers | swap | yes | linux-netsnmp: memTotalSwap, memAvailSwap |
| Routers, switches | IF-MIB counters, ifOperStatus | yes | generic (Ports tab) |
| Routers, switches | ENTITY-SENSOR-MIB temp/fan/PSU | partial | generic entPhySensorValue is the raw reading only: its type, scale and precision are not applied, so units are mixed (environment tab, labelled raw). No fan or PSU state. cisco-ios/cisco-nxos entSensorValue is the same |
| Routers, switches | POWER-ETHERNET-MIB PoE per port | no | not in any profile |
| Routers, switches | LLDP neighbours | yes | generic discovery table only (no metric) |
| Routers, switches | BGP-4-MIB peer state and prefixes | partial | see "BGP peers" below: state, uptime, accepted prefixes per address family and update counters where the device answers a BGP MIB; nothing on MikroTik or Linux hosts |
| Routers, switches | optics DOM | partial | juniper-junos jnxDom* are collected but are interface metrics, so they are not on a device tab (there is no optics tab data yet); cisco entSensor DOM is not separated from the raw sensor reading |
| Routers, switches | STP topology changes | no | |
| Routers, switches | MAC/ARP table size | yes | the tables themselves, not just their size: the L2 table job (internal/l2) reads FDB, VLAN names and ARP/ND from every SNMP device (see "MAC, ARP and FDB" below) |
| Routers, switches | cpmCPUTotal, jnxOperatingCPU | yes | cisco-ios, cisco-nxos: cpmCPUTotal5minRev; juniper-junos: jnxOperatingCPU, jnxOperatingTemp, jnxOperatingBuffer |
| Routers, switches | Cisco memory pools | yes | cisco-ios: ciscoMemoryPoolUsed / Free (not as a percent; there is no total) |
| Switches (Ubiquiti) | memory | partial | ubiquiti-edgeswitch, ubiquiti-unifi-switch: free / available only; CPU is a text string in that MIB and is not collected |
| Firewalls | session count | partial | fortigate: fgSysSesCount (no maximum); pfsense has no vendor metrics |
| Firewalls | VPN tunnel state | no | |
| Firewalls | HA state | partial | fortigate: fgHaSystemMode only |
| Firewalls | policy throughput (fgSys, panSession, pfSense) | no | fortigate CPU and memory only |
| APs, controllers | client count per AP and SSID | yes | ubiquiti-unifi-ap: unifiVapNumStations per SSID |
| APs, controllers | channel utilization | yes | ubiquiti-unifi-ap: unifiRadioCu* per radio |
| APs, controllers | noise floor | no | the UniFi MIB has no such object |
| APs, controllers | tx power | yes | ubiquiti-unifi-ap: unifiVapTxPower |
| APs, controllers | AP up/down from controller | no | no controller integration |
| WISP radios, CPE | signal, SNR, modulation, link capacity | no | no Ubiquiti airMAX, Cambium or Mimosa profile |
| Servers, hypervisors | Proxmox push | yes | push receiver and the proxmox integration (not a profile) |
| Servers, hypervisors | node_exporter, Ceph, SMART | no | |
| UPS, PDU | battery charge, runtime, input/output voltage, load, output status | yes | apc-ups: UPS-MIB and PowerNet upsAdv/upsBasic metrics (power tab) |
| UPS, PDU | per-outlet current (PDU MIBs), generator status | no | |
| Printers | supply levels per prtMarkerSupplies | yes | printer: prtMarkerSuppliesLevel of prtMarkerSuppliesMaxCapacity; -3 "some remaining" and -2 "unknown" are stored and shown as words |
| Printers | supply type and colour | yes | printer: prtMarkerSuppliesType and prtMarkerColorantValue, read at discovery as component attributes |
| Printers | page count | yes | printer: prtMarkerLifeCount |
| Printers | status and alerts | partial | printer: prtAlertSeverityLevel (severity only, not the alert description or code) |
| Printers | paper tray levels | yes | printer: prtInputCurrentLevel of prtInputMaxCapacity, labelled by prtInputName |
| Printers | hp, Brother, Xerox serial and model | no | serial and model are not collected; no vendor quirk profiles (printer-brother, printer-ricoh) are shipped, see below |
| Environment | ENTITY-SENSOR-MIB | partial | as for routers: raw reading only |
| Environment | temperature, humidity, door, water (NetBotz, Raritan) | no | no profile |
| Environment | MikroTik health | yes | mikrotik-routeros: voltage, board and CPU temperature |
| Services | ping, HTTP, DNS, TLS expiry | yes | checks (not profiles) |
Profiles with no vendor metrics beyond generic: arista-eos, pfsense, vyos, windows-snmp.
Alerts named in the spec
| Alert | Status |
|---|---|
| cpu_high, memory_high, disk_full | yes |
| ups_on_battery, ups_runtime_low | yes |
| printer_supply_low (< 10%) | yes |
| printer_supply_empty (level 0, critical) | yes (added in v1.0.1) |
| temp_high (per-profile threshold) | yes, for MikroTik, UPS battery and Junos sensors only |
| "any prtAlert of severity critical" | no rule; prtAlertSeverityLevel is collected and shown, not alerted on |
Printer quirk profiles (Brother, Ricoh)
Not shipped. The LibreNMS recordings (tests/snmpsim/brother*.snmprec, ricoh*.snmprec) were not used to derive a
quirk set, so none is claimed. The generic printer profile matches Brother (2435) and Ricoh (367) by enterprise number.
BGP peers (v1.3)
The component is the peer address (IPv6 compressed). Metrics: bgp_peer_state (idle, connect, active, opensent, openconfirm, established; anything but established is critical), bgp_peer_uptime, bgp_peer_in_updates / bgp_peer_out_updates (counters, shown as a rate) and, where the vendor reports prefixes per address family, bgp_prefixes_accepted with the component <peer>|<afi>-<safi>. Peer AS, local AS, router id (and the description, where the MIB has one) are component attributes from discovery. A peer is reported once: a profile with a vendor table replaces the BGP4-MIB metrics of the same names.
| Profile | Source | IPv6 peers | Prefixes | Evidence |
|---|---|---|---|---|
| cisco-ios | CISCO-BGP4-MIB cbgpPeer2Table and cbgpPeer2AddrFamilyPrefixTable | yes | per AFI/SAFI | IOS XE and IOS XR recordings (iosxe, iosxr, iosxr_asr9904) |
| cisco-nxos | CISCO-BGP4-MIB, as cisco-ios | yes | per AFI/SAFI | not verified: the NX-OS recordings carry no BGP table; kept because Cisco documents the MIB on NX-OS, and a device that does not answer simply has no peers |
| juniper-junos | BGP4-V2-MIB-JUNIPER jnxBgpM2PeerTable, jnxBgpM2PrefixCountersTable | yes | per AFI/SAFI (resolved through jnxBgpM2PeerIndex) | junos_mx, junos_vmx, junos_rpm; the peer index has no length octets, as Junos sends it |
| arista-eos | ARISTA-BGP4V2-MIB aristaBgp4V2PeerTable, aristaBgp4V2PrefixTable | yes | per AFI/SAFI | arista_eos, arista_eos_7280r; description is collected |
| ubiquiti-edgeos, fortigate, pfsense, vyos | BGP4-MIB bgpPeerTable (generic metrics switched on with enable_metrics) |
no (RFC 4273 is IPv4 only) | no | edgeos, fortigate_60f3g4g, pfsense_frr-bgp (FRR's agentx BGP4-MIB); VyOS uses FRR the same way but has no recording |
| generic and every other profile | BGP4-MIB metrics exist but are off (optional) |
no | no | a router profile turns them on with enable_metrics |
| mikrotik-routeros | nothing | MIKROTIK-MIB has no BGP objects and none of the RouterOS recordings answers a BGP table; RouterOS BGP is not visible over SNMP | ||
| linux-netsnmp, windows-snmp, apc-ups, printer, ubiquiti switches and APs | nothing | not routers |
FRR on Cumulus (cumulus_bgp) and Dell OS (dnos_bgp) answer BGP4-MIB, but no shipped profile matches those devices, so their peers are collected only once a profile for them enables the generic metrics.
MAC, ARP and FDB (v1.3)
Read by the L2 table job for every SNMP device, from BRIDGE-MIB (dot1dBasePortIfIndex, dot1dTpFdbPort), Q-BRIDGE-MIB (dot1qTpFdbPort, dot1qVlanFdbId, dot1qVlanStaticName), CISCO-VTP-MIB (vtpVlanState, vtpVlanName, only with the cisco-ios flag l2.per_vlan_context, walking the bridge table once per VLAN with community <community>@<vlan> or v3 context vlan-<vlan>) and IP-MIB (ipNetToPhysicalPhysAddress for IPv4 ARP and IPv6 ND, ipNetToMediaPhysAddress as the IPv4-only fallback). Devices without a bridge MIB (servers, firewalls without a switch, most APs) have no FDB rows. The FDB is VLAN-aware only through Q-BRIDGE or the Cisco per-VLAN walk; BRIDGE-MIB alone gives VLAN 0.