Conversation
|
@SuperQ could you take a look when you have time please? |
|
This LGTM |
|
Also I wonder if default should be actually true, because historically this didnt have transport labels/cardinality and likely this is the expected way for majority. |
Shouldn't the default be more verbose? |
Looking at it from the user perspective, your change feels like a pretty significant behavioural change. Previously users had N metrics, and after upgrading that number could suddenly be multiplied depending on the setup. I think the decision to enable more detailed reporting should be explicit and made by the user, not introduced implicitly by changing the default behaviour. It potentially break existing dashboards or alerts that relied on the previous output. |
|
@SuperQ is there a chance you can review this please? |
|
Would you please rebase this to fix the conflict and get the latest CI configuration? |
| logind | Exposes session counts from [logind](http://www.freedesktop.org/wiki/Software/systemd/logind/). | Linux | ||
| meminfo\_numa | Exposes memory statistics from `/sys/devices/system/node/node[0-9]*/meminfo`, `/sys/devices/system/node/node[0-9]*/numastat`. | Linux | ||
| mountstats | Exposes filesystem statistics from `/proc/self/mountstats`. Exposes detailed NFS client statistics. | Linux | ||
| mountstats | Exposes filesystem statistics from `/proc/self/mountstats`. Exposes detailed NFS client statistics. Use `--collector.mountstats.nfs.aggregate-transports` to sum NFS transport metrics across connections (e.g. `nconnect`) and emit a single series per mount instead of one per transport. | Linux |
There was a problem hiding this comment.
I wonder if we should document these extra flags in a separate section.
…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>
Signed-off-by: Evgeny Kuzin <evgeny.kuzin@outlook.com>
1754be8 to
d394068
Compare
rebased, thank you for taking a look! |
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.