-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZFS collector uses different names for the same metric on FreeBSD vs Linux #1945
Comments
Yes, I never liked the dumping of random proc contents with no filtering. This leads to random breakage. |
To minimise this breaking change, how about cleaning up the references, but also providing a flag to control whether the old names should be published or not? --publish-lagecy-names can default to true, allowing the cleanup to be a no-op immediately. In a future release, the flag can be disabled and eventually retired. |
Yeah I was thinking about some sort of 'translation' layer to support that for all collectors. So if you come up with a clean pattern for doing this, that would make sense. Beside that, we provided recording rules for breaking changes in the past. |
How about:
Although it takes a while to complete all the states, I've used this pattern quite a lot professionally. |
@conallob I don't like maintaining those recording rules. IMO it's better for handing the changes in PromQL downstream with queries like Simplified timeline:
|
Make metric names between `freebsd` and `linux` consistent. This is gated behind the "consistent-zfs-linux-metric-names" gate, and disabled by default. Fixes: prometheus#1945 Signed-off-by: Pranshu Srivastava <[email protected]>
Make metric names between `freebsd` and `linux` consistent. This is gated behind the "consistent-zfs-linux-metric-names" gate, and disabled by default. Fixes: prometheus#1945 Signed-off-by: Pranshu Srivastava <[email protected]>
Make metric names between `freebsd` and `linux` consistent. This is gated behind the "consistent-zfs-linux-metric-names" gate, and disabled by default. Fixes: prometheus#1945 Signed-off-by: Pranshu Srivastava <[email protected]>
Make metric names between `freebsd` and `linux` consistent. This is gated behind the "consistent-zfs-linux-metric-names" gate, and disabled by default. Fixes: prometheus#1945 Signed-off-by: Pranshu Srivastava <[email protected]>
Make metric names between `freebsd` and `linux` consistent. This is gated behind the `ConsistentZFSLinuxMetricNames` gate, and disabled by default. Fixes: prometheus#1945 Signed-off-by: Pranshu Srivastava <[email protected]>
Make metric names between `freebsd` and `linux` consistent. This is gated behind the `ConsistentZFSLinuxMetricNames` gate, and disabled by default. Fixes: prometheus#1945 Signed-off-by: Pranshu Srivastava <[email protected]>
Make metric names between `freebsd` and `linux` consistent. This is gated behind the `ConsistentZFSLinuxMetricNames` gate, and disabled by default. Fixes: prometheus#1945 Signed-off-by: Pranshu Srivastava <[email protected]>
Host operating system: output of
uname -a
FreeBSD shoebox 12.2-RELEASE-p2 FreeBSD 12.2-RELEASE-p2 663e6b09467(HEAD) TRUENAS amd64
Linux ishtar 5.8.0-40-generic #45-Ubuntu SMP Fri Jan 15 11:05:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
node_exporter version: output of
node_exporter --version
I'm using the packaged versions for FreeBSD 12 (latest) and Ubuntu 20.10
node_exporter command line flags
FreeBSD:
--web.listen-address=172.17.3.5:9100 --collector.textfile.directory=/var/tmp/node_exporter --collector.zfs
Linux: (none, using defaults)
Are you running node_exporter in Docker?
No
What did you do that produced an error?
Ran node_exporter, collecting ZFS metrics on both Linux and FreeBSD
What did you expect to see?
Metrics would have the same name (I think that's the right term?) from both nodes.
What did you see instead?
The names of metrics exported from FreeBSD are different from the ones from Linux.
Extra Comments
The FreeBSD system is more precisely running TrueNAS, but it's close enough to FreeBSD that it doesn't make a big difference. The FreeBSD system is using OpenZFS 2.0, while the Linux system is using ZFSonLinux 0.8.4 (same project, they're skipping 1.0 while unifying the different OSs to a single codebase), so they're close enough that it shouldn't make a difference.
The FreeBSD ZFS collector is modifying the names that it's reading from sysctl, while the Linux ZFS collector seems to be basically dumping the contents of
/proc/spl/kstat/zfs/*
, munging the names so that they fit the proper naming scheme.The text was updated successfully, but these errors were encountered: