disk

package
v0.0.0-...-4e37ce3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(mountPoint string, pathMatcher types.Matcher, ignoreFSTypes []string, k8sResolver KubernetesPodResolver) (i telegraf.Input, err error)

New initializes disk.Input

mountPoint is the root path to monitor. Useful when running inside a Docker. k8sResolver may be nil; when set, filesystem metrics of Kubernetes pod volumes are enriched with pod labels (namespace, pod_name, owner_*, volume/pv) and their item is rewritten to a short stable per-node identifier instead of the volatile kubelet mount path.

Types

type KubernetesPodResolver

type KubernetesPodResolver interface {
	// PodVolumeLabels returns the Kubernetes labels (namespace, pod_name, owner_kind,
	// owner_name) for the pod with the given UID. found is false when the pod is not
	// (yet) known.
	PodVolumeLabels(podUID string) (labels map[string]string, found bool)
	// CSIVolumeLabels returns the labels identifying a CSI volume mount whose kubelet
	// directory is dir: {pv} (+ {volume} when resolvable) for a PVC-backed volume, or
	// {volume} for an inline (ephemeral) CSI volume.
	CSIVolumeLabels(podUID, dir string) map[string]string
}

KubernetesPodResolver resolves Kubernetes labels for a pod volume mount.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL