Page MenuHomeFreeBSD

prometheus_sysctl_exporter: fix metric aliasing
ClosedPublic

Authored by asomers on Apr 18 2022, 9:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 14, 5:41 PM
Unknown Object (File)
Thu, Feb 12, 8:50 PM
Unknown Object (File)
Sun, Feb 8, 4:42 AM
Unknown Object (File)
Sat, Jan 31, 1:38 PM
Unknown Object (File)
Jan 21 2026, 8:42 AM
Unknown Object (File)
Jan 21 2026, 1:00 AM
Unknown Object (File)
Jan 20 2026, 8:28 PM
Unknown Object (File)
Jan 20 2026, 8:09 PM

Details

Summary

When exporting sysctls to Prometheus, the exporter replaces "." with
"_". This caused several metrics to alias, confusing the Prometheus
server. Fix it by:

  • Renaming the "tcp_log_bucket" UMA zone to "tcp_log_id_bucket". Also, rename "tcp_log_node" to "tcp_log_id_node" for consistency.
  • Not exporting sysctls with "(LEGACY)" in the description. That is used by ZFS sysctls that have been replaced by others, many of which alias to the same Prometheus metric name (like "vfs.zfs.arc_max" and "vfs.zfs.arc.max").

PR: 259607
Reported by: delphij
MFC after: 2 weeks
Sponsored by: Axcient

Test Plan

manually tested with prometheus_sysctl_exporter | sort | awk '{print $1}' | uniq -c | grep -v '^ *1'

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Apr 19 2022, 7:38 AM