influxdata/telegraf

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

Open

#16,871 创建于 2025年4月23日

在 GitHub 查看
 (4 评论) (2 反应) (0 负责人)Go (9,892 star) (4,161 fork)batch import
feature requesthelp wantedsize/s

描述

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

贡献者指南