Skip to content

feat(exporter): align shell/collector metrics to daemon canonical names#435

Closed
itcmsgr wants to merge 1 commit intomainfrom
feat/p91c-shell-exporter-alignment
Closed

feat(exporter): align shell/collector metrics to daemon canonical names#435
itcmsgr wants to merge 1 commit intomainfrom
feat/p91c-shell-exporter-alignment

Conversation

@itcmsgr
Copy link
Copy Markdown
Owner

@itcmsgr itcmsgr commented Apr 16, 2026

Summary

  • Unifies metric names across all export surfaces to match daemon /metrics contract (v1.90.0)
  • Shell exporter is a relay of daemon vocabulary, not a parallel namespace
  • 7 metric concepts renamed, dashboards and alerts updated

Renames

Finding Old Shell Name New Canonical Name
P-1 nftban_goroutines nftban_runtime_goroutines
P-1b nftban_daemon_goroutines nftban_runtime_goroutines
P-2 nftban_conntrack_entries nftban_conntrack_used
P-3 nftban_memory_rss_bytes nftban_proc_rss_bytes
P-4 nftban_watchdog_{cpu,mem,io,net}_score nftban_pressure_score{dim=X}
P-5 nftban_watchdog_mode (integer) nftban_operating_mode{mode=X} (one-hot)
P-6 nftban_nftables_rules_total nftban_nft_rules_total

Files changed

  • nftban_unified_exporter_collect.sh — all metric renames
  • nftban_unified_exporter_export.sh — HELP/TYPE header update
  • internal/metrics/collector.go — Go textfile collector P-6 rename
  • nftban_performance.json — dashboard query update
  • nftban-metrics.yml — alert expression update
  • metrics-registry.json — registry entries + Zabbix mappings

Test plan

  • grep -R "nftban_nftables_rules_total" . → 0 active emitters
  • grep -R "nftban_watchdog_cpu_score" cli/lib/ → 0 active emitters
  • grep -R "nftban_goroutines\b" cli/lib/ → 0 (only nftban_runtime_goroutines)
  • ShellCheck passes
  • Go builds clean
  • Lab host: compare .prom output before/after

Ref: V191_PIPELINE_INTEGRITY_AUDIT.md (P-1 through P-7)

🤖 Generated with Claude Code

Unify metric names across all export surfaces to match the daemon
/metrics contract frozen in v1.90.0. The shell exporter is a relay
of daemon vocabulary, not a parallel namespace.

Renames (shell/collector → daemon canonical):
- P-1: nftban_goroutines → nftban_runtime_goroutines
- P-1b: nftban_daemon_goroutines → nftban_runtime_goroutines
- P-2: nftban_conntrack_entries → nftban_conntrack_used
- P-3: nftban_memory_rss_bytes → nftban_proc_rss_bytes
- P-4: nftban_watchdog_{cpu,mem,io,net}_score → nftban_pressure_score{dim=X}
- P-5: nftban_watchdog_mode (integer) → nftban_operating_mode{mode=X} (one-hot)
- P-6: nftban_nftables_rules_total → nftban_nft_rules_total

Updated across: shell exporter, Go collector, dashboards, alerts,
metrics-registry.json, and HELP/TYPE headers.

Pipeline audit: V191_PIPELINE_INTEGRITY_AUDIT.md (P-1 through P-7)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@itcmsgr
Copy link
Copy Markdown
Owner Author

itcmsgr commented Apr 16, 2026

Superseded by #437 (combined v1.91 PR)

@itcmsgr itcmsgr closed this Apr 16, 2026
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