Skip to content

feat: add protected FDB summary collector#7

Merged
rokernel merged 1 commit intomasterfrom
feat/fdb-summary-collector
Feb 24, 2026
Merged

feat: add protected FDB summary collector#7
rokernel merged 1 commit intomasterfrom
feat/fdb-summary-collector

Conversation

@rokernel
Copy link
Owner

Summary

  • add a new FDB collector that reads ASIC DB entries and exports summary metrics for total entries, entries by port, entries by VLAN, and entries by type
  • keep the scrape path protected by using background refresh with cache, timeout, max-entry limits, and truncation/skipped counters
  • add ASIC DB support in the Redis client and register the new collector behind FDB_ENABLED (default disabled)
  • add fixtures and tests for FDB parsing, unknown VLAN handling, per-port/per-vlan counts, and truncation/skipped tracking
  • document new FDB collector and configuration variables in README

Why

Operators need MAC/FDB visibility for Grafana dashboards and alerting, but exporting per-MAC labels would create high cardinality. This change provides useful aggregate metrics while protecting switch and Prometheus performance.

Verification

  • go test ./...
  • go build ./...
  • go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8 run
  • ./scripts/build.sh

@rokernel rokernel merged commit 40e5197 into master Feb 24, 2026
2 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