Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Feat]: Avoid repeated SNMP typed table walks #22604

Copy link
Copy link
@ilyam8

Description

@ilyam8
Issue body actions

Problem

Typed SNMP licensing and BGP rows can repeatedly walk unsupported or empty table roots on every collection cycle.

This happens because broad Cisco profile coverage now attaches typed licensing and BGP mixins to many devices. When a device does not expose those typed tables, the collector walks the table root, gets no usable rows, and does not remember that result. Normal table-cache reuse only starts after a non-empty table walk discovers row structure.

Current examples:

  • cisco.yaml extends _cisco-licensing-traditional.yaml and _cisco-licensing-smart.yaml.
  • cisco-catalyst.yaml extends _cisco-bgp4-mib.yaml.
  • collectTableLicenseRows() and collectTableBGPRows() skip empty walks without caching the table as unsupported/empty for later cycles.

Description

Add a narrowly scoped negative-cache path for typed SNMP table roots used by licensing and BGP rows.

The goal is to avoid repeated table-root walks for unsupported typed licensing/BGP tables, while preserving these safety properties:

  • do not reintroduce broad missingOIDs poisoning for ordinary metric tables;
  • do not permanently hide empty-but-valid tables;
  • do not suppress ordinary metrics or topology collection;
  • include typed BGP dependency tables, not only primary BGP row tables, if they have the same repeated-walk behavior.

Implementation must first verify actual gosnmp behavior. The old SOW assumed explicit NoSuchObject / NoSuchInstance table-root PDUs are observable from walks, but local gosnmp source stops WalkAll / BulkWalkAll on these sentinel PDUs without appending them to returned results. If explicit unsupported-vs-empty detection is not available from walk results, use a bounded TTL negative cache for typed licensing/BGP table roots rather than a permanent unsupported marker.

Importance

really want

Value proposition

Users keep broad out-of-the-box Cisco licensing/BGP support, while unsupported devices avoid repeated useless table walks each cycle.

Proposed implementation

  • Add tests for typed licensing table roots and typed BGP table roots with:
    • unsupported/no-such behavior;
    • empty valid table behavior;
    • ordinary metric table behavior unchanged;
    • BGP dependency table behavior where applicable.
  • Implement a typed-only negative-cache mechanism, likely keyed by table root OID and typed surface (licensing / bgp), with TTL behavior aligned with existing table cache TTL.
  • Do not use the global scalar/table missingOIDs map for this unless the implementation proves it cannot poison ordinary tables.
  • Keep profile schema and public config unchanged.
  • Update SNMP projection/spec docs only if the final behavior becomes a durable typed-row collection contract.

Acceptance Criteria

  • Unsupported or repeatedly empty typed licensing table roots are not walked every collection cycle.
  • Unsupported or repeatedly empty typed BGP table roots are not walked every collection cycle.
  • Empty valid tables are not permanently marked unsupported.
  • Ordinary metric table collection behavior is unchanged.
  • Tests cover licensing, BGP, empty-table, and ordinary-table cases.
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.