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)
Mar 12 2024, 6:50 AM
Unknown Object (File)
Mar 12 2024, 6:50 AM
Unknown Object (File)
Mar 8 2024, 5:21 AM
Unknown Object (File)
Mar 8 2024, 5:10 AM
Unknown Object (File)
Feb 11 2024, 9:05 AM
Unknown Object (File)
Jan 14 2024, 8:40 AM
Unknown Object (File)
Dec 22 2023, 11:29 PM
Unknown Object (File)
Dec 19 2023, 6:10 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