Skip to content

feat: add cached VLAN and LAG Redis collectors#6

Merged
rokernel merged 4 commits intomasterfrom
feat/vlan-lag-collectors
Feb 23, 2026
Merged

feat: add cached VLAN and LAG Redis collectors#6
rokernel merged 4 commits intomasterfrom
feat/vlan-lag-collectors

Conversation

@rokernel
Copy link
Owner

Summary

  • add a new VLAN collector that reads VLAN|*, VLAN_MEMBER|*, and VLAN_TABLE:* from Redis and exports VLAN/member state metrics
  • add a new LAG collector that reads PORTCHANNEL|*, LAG_TABLE:*, and LAG_MEMBER_TABLE:* from Redis and exports PortChannel/member state metrics
  • keep scrape path safe by using background refresh + cached metric snapshots for both collectors (same protection model as LLDP)
  • register new collectors in the main exporter and add environment-based guardrails for refresh interval, timeout, and max items
  • extend fixtures and tests to validate VLAN and LAG metric output

Why

You requested VLAN/PortChannel visibility from SONiC Redis with low impact on switch CPU and scrape latency. This design keeps the exporter read-only and prevents LLDP/VLAN/LAG refresh work from blocking /metrics scrapes.

Verification

  • go test ./...
  • go build ./...
  • ./scripts/build.sh

@rokernel
Copy link
Owner Author

Reopening to retrigger pull_request checks.

@rokernel rokernel closed this Feb 23, 2026
@rokernel rokernel reopened this Feb 23, 2026
@rokernel rokernel merged commit 0f95ba8 into master Feb 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant