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)
Mon, Aug 31, 2:02 AM
Unknown Object (File)
Mon, Aug 24, 11:19 PM
Unknown Object (File)
Sat, Aug 22, 8:49 AM
Unknown Object (File)
Fri, Aug 21, 8:00 PM
Unknown Object (File)
Fri, Aug 21, 5:48 AM
Unknown Object (File)
Thu, Aug 20, 5:21 PM
Unknown Object (File)
Wed, Aug 19, 6:34 AM
Unknown Object (File)
Tue, Aug 18, 12:12 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45216
Build 42104: arc lint + arc unit

Event Timeline

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