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.
Click to show internal directories.
Click to hide internal directories.