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)
Oct 19 2024, 11:58 AM
Unknown Object (File)
Oct 7 2024, 1:43 PM
Unknown Object (File)
Oct 5 2024, 7:52 PM
Unknown Object (File)
Oct 5 2024, 3:32 AM
Unknown Object (File)
Oct 2 2024, 9:14 AM
Unknown Object (File)
Oct 2 2024, 1:55 AM
Unknown Object (File)
Oct 1 2024, 7:23 AM
Unknown Object (File)
Sep 30 2024, 7:15 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