HomeFreeBSD

prometheus_sysctl_exporter: fix metric aliasing

Description

prometheus_sysctl_exporter: fix metric aliasing

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
Reviewed by: delphij,rew,thj
Differential Revision: https://reviews.freebsd.org/D34952

Details

Provenance
asomersAuthored on Apr 18 2022, 9:29 PM
Reviewer
delphij
Differential Revision
D34952: prometheus_sysctl_exporter: fix metric aliasing
Parents
rG19447fc48883: sfxge: plug set-but-not-used vars
Branches
Unknown
Tags
Unknown