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)
Wed, Jan 21, 8:42 AM
Unknown Object (File)
Wed, Jan 21, 1:00 AM
Unknown Object (File)
Tue, Jan 20, 8:28 PM
Unknown Object (File)
Tue, Jan 20, 8:09 PM
Unknown Object (File)
Tue, Jan 20, 4:48 PM
Unknown Object (File)
Tue, Jan 20, 1:37 PM
Unknown Object (File)
Dec 24 2025, 7:07 PM
Unknown Object (File)
Dec 12 2025, 11:11 AM

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