influxdata/telegraf

[inputs.disk] Add support to report mount status (mounted vs unmounted)

Open

#16871 opened on Apr 23, 2025

View on GitHub
 (4 comments) (2 reactions) (0 assignees)Go (9,892 stars) (4,161 forks)batch import
feature requesthelp wantedsize/s

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