Add include configuration to diskstat collector

This commit is contained in:
Thomas Roehl
2025-12-19 17:32:54 +01:00
parent 6b10797556
commit b77d9a6cf0
2 changed files with 102 additions and 16 deletions

View File

@@ -16,19 +16,38 @@ hugo_path: docs/reference/cc-metric-collector/collectors/diskstat.md
"exclude_metrics": [
"disk_total"
],
"exclude_mounts": [
"exclude_devices": [
"slurm-tmpfs"
],
"exclude_mountpoints": [
"/tmp"
],
"mountpoint_as_stype": true,
"use_include_config": false,
"include_devices": [
"/dev/sda3"
],
"include_mountpoints" : [
"/home"
]
}
```
The `diskstat` collector reads data from `/proc/self/mounts` and outputs a handful **node** metrics. If a metric is not required, it can be excluded from forwarding it to the sink. Additionally, any mount point containing one of the strings specified in `exclude_mounts` will be skipped during metric collection.
The `diskstat` collector reads data from `/proc/self/mounts` and outputs a handful **node** metrics with `stype=filesystem,stype-id=<mountdevice>`. If a metric is not required, it can be excluded from forwarding it to the sink.
Metrics per device (with `device` tag):
For sending the `mountpoint` instead of the `mountdevice` in the `stype-id`, use `mountpoint_as_stype`.
There are two ways to specify for which devices or mountpoints the collector generates metrics. It's "either ...or".
- Excluding devices and mount points using `exclude_devices` and `exclude_mountpoints`. All devices (*) will be read that are not explicitly excluded
- Include devices and mount points by setting `use_include_config:true` and using `include_devices` and `include_mountpoints`.
(*) File systems where the mount device (first column in `/proc/self/mounts`) contains `loop` are always excluded. Filesystems where the mount point (second column in `/proc/self/mounts`) contains `boot` are also always excluded.
Metrics per filesystem (with `stype=filesystem` tag and `stype-id` based on the configuration):
* `disk_total` (unit `GBytes`)
* `disk_free` (unit `GBytes`)
Global metrics:
Global metrics (with `stype=filesystem` tag and `stype-id` pointing to the max. used filesystem device or mount point based on the configuration):
* `part_max_used` (unit `percent`)