influxdata / influxdata/telegraf
[inputs.disk] Add support to report mount status (mounted vs unmounted)
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Use Case
Request that inputs.disk include a field or tag for mount status (mounted vs unmounted).
Why it's important:
Use case (e.g., real-world incident where a failed mount wasn’t detected).
Why inputs.disk is the right place:
Because it already collects filesystem stats — but silently ignores unmounted entries.
Why current workarounds aren't ideal:
Using inputs.exec and a custom script is a workaround, but built-in support would be more native and scalable.
### Expected behavior
Current inputs.disk silently skips unmounted filesystems, which can result in undetected mount failures. We'd like to propose exposing mount state (mounted vs not mounted) as a field or tag.
With this config we can alert on the status to make sure the appropriate teams know there is an issue before the client
### Actual behavior
The inputs.disk plugin collects metrics only for currently mounted filesystems. If a filesystem listed in /etc/fstab or otherwise expected to be present is unmounted or fails to mount, it is silently skipped and no metrics are reported for that mount point.
As a result, Telegraf provides no visibility into failed or missing mounts using inputs.disk alone. This can lead to production issues going undetected, especially if services depend on specific mount points being present.
### Additional info
_No response_
Contributor guide
Research direction
Start by locating the inputs.disk plugin and reading how it discovers and reports filesystem metrics. Compare that behavior with expected entries from /etc/fstab and determine how mounted versus unmounted state should be represented. Done means inputs.disk exposes the requested mount status and tests cover both states.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100