mountstats: add --collector.mountstats.nfs.aggregate-transports flag#3650
Open
evkuzin wants to merge 1 commit intoprometheus:masterfrom
Open
mountstats: add --collector.mountstats.nfs.aggregate-transports flag#3650evkuzin wants to merge 1 commit intoprometheus:masterfrom
evkuzin wants to merge 1 commit intoprometheus:masterfrom
Conversation
…educe cardinality coming from nconnect nfs feature Signed-off-by: Author Name <evgeny.kuzin@outlook.com> Signed-off-by: Evgeny Kuzin <evgeny.kuzin@outlook.com>
Author
|
@SuperQ could you take a look when you have time please? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an opt-in flag, --collector.mountstats.nfs.aggregate-transports, that sums the per-transport NFS metrics across all export entries of a mount and emits a single series per mount (no transport label).
Before 29f6ec0a, mountstats_linux only read the first export entry from /proc/self/mountstats, which silently underreported every transport metric on mounts using NFS nconnect. That commit correctly fixed the numbers by iterating all transports and adding a transport index label.
The fix is right, but for hosts with many NFS mounts and high nconnect values it multiplies the existing (already large) node_mountstats_nfs_* cardinality by nconnect. On a host with tens of mounts, enabling nconect will turns into tens of thousands of additional series per scrape (multiplies all nfs metrics by nconnect value) which is enough to be a real operational problem for the monitoring.
When the new flag is set:
The 10 node_mountstats_nfs_transport_* descriptors are built without the transport label, restoring the pre-29f6ec0a schema and cardinality.
All export entries are aggregated into a single value per mount before being emitted:
Default is false, so existing scrapes are unchanged.
Happy to add some tests as well.