Skip to content

Scrape the switch's VLAN table: dot1qPvid is not in the snmp module, and a port moved unnoticed #482

Closed as not planned

Description

@Gerrrt

The snmp job scrapes neo (10.7.7.2) for interface data only. Series present for that instance today: ifDescr, ifIndex, ifOperStatus, ifInOctets, ifOutOctets, ifHCInOctets, ifHCOutOctets, sysDescr. Nothing about VLANs.

That gap has just cost something concrete. Switch port 15 moved from VLAN 30 to VLAN 40 some time after 2026-09-04 — presumably when the NAS was installed on 2026-09-16 — and nothing in either repository noticed, because nothing can see it. It was found by hand, by logging into the switch's web UI.

The ask: add Q-BRIDGE-MIB to the module this switch is scraped with, so the port-to-VLAN map is a metric.

  • dot1qPvid (1.3.6.1.2.1.17.7.1.4.5.1.1) is the useful one on its own — one value per port, and it is what an access port's membership actually turns on.
  • dot1qVlanStaticUntaggedPorts / dot1qVlanStaticEgressPorts give the full table if the port-list bitmaps are worth the trouble; the PVID alone would answer the question that was missed.

The switch's write community is empty and the read community already works, so this is a read-only addition to the walk.

Why it is worth doing rather than living with the workaround. The wiki's drift-check now carries a claim for the port map, and with no metric to read it has to get there the only way that exists: SSH to morpheus, then a cleartext HTTP login to the switch with a cookie, once a day. That is a daily credentialed cleartext login added to a cron path, to read six numbers. If the PVIDs were in Prometheus the claim would read them the way the other twenty-six claims read their facts, and that code could be deleted outright — the checker's comment says so, and points here.

Related on the wiki side: Gerrrt/Lemmiwinks#300, and #481 for the missing switch step in build-the-nas.md.

Activity

  1. Gerrrt commented on Sep 17, 2026

    @Gerrrt
    OwnerAuthor

    Closing this: the switch's agent does not hold VLAN data at all. Measured on 2026-09-17 against the live switch from morpheus, at this module's own request shape (-Cr5 -r2 -t7), with the read community taken off the device rather than from sops:

    .1.3.6.1.2.1.17.7.1.4.5.1.1   dot1qPvid              → No Such Instance currently exists at this OID
    .1.3.6.1.2.1.17.1.4.1.2       dot1dBasePortIfIndex   → No Such Instance currently exists at this OID
    

    It is not that the columns are empty — they are absent. One GETBULK at the BRIDGE-MIB root shows what the agent actually has under 1.3.6.1.2.1.17:

    .1.3.6.1.2.1.17.4.4.1.1.1 = Gauge32: 1
    .1.3.6.1.2.1.17.4.4.1.1.2 = Gauge32: 2
    ...
    

    dot1dTpPortTable and nothing before it — so no dot1dBase (17.1), no dot1dTpFdbTable (17.4.3), and no dot1q (17.7). The vendor tree is empty too:

    .1.3.6.1.4.1.27282 = No more variables left in this MIB View
    

    …which is the enterprise OID this switch reports as its own sysObjectID. A GETBULK past dot1qPvid lands in ifXTable (ifName), confirming there is nothing between.

    So there is no walk to add, and the generator change this issue asked for cannot be written. The port-to-VLAN map exists only in the web UI.

    What that means for the thing this was meant to retire. The wiki's drift-check reads the port map by logging into the switch over HTTP through morpheus, once a day, and the script's comment pointed here as the cheap way out. There isn't one — that comment is being corrected to record this measurement instead, so the next person does not re-propose the walk. Being the only possible mechanism is a better argument for it than being the convenient one.

    Two things this measurement is worth keeping for, beyond the VLANs: the agent has no forwarding table either (so "which port is this MAC on" is also web-UI-only), and the vendor tree is empty, which closes off the usual fallback for a switch whose standard MIBs are thin.

    No change to generator.yaml — the walk stays five columns plus sysDescr. Probing cost: three GETBULKs and one short walk, well inside the care this device is owed.

    Refs #481, Gerrrt/Lemmiwinks#300.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new capability or a changeobservabilitystacks/observability on prometheus

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions