Add ability to collect pod labels to Kubernetes input (#6764)
This commit is contained in:
17
plugins/inputs/kubernetes/kubernetes_pods.go
Normal file
17
plugins/inputs/kubernetes/kubernetes_pods.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package kubernetes
|
||||
|
||||
type Pods struct {
|
||||
Kind string `json:"kind"`
|
||||
ApiVersion string `json:"apiVersion"`
|
||||
Items []Item `json:"items"`
|
||||
}
|
||||
|
||||
type Item struct {
|
||||
Metadata Metadata `json:"metadata"`
|
||||
}
|
||||
|
||||
type Metadata struct {
|
||||
Name string `json:"name"`
|
||||
Namespace string `json:"namespace"`
|
||||
Labels map[string]string `json:"labels"`
|
||||
}
|
||||
Reference in New Issue
Block a user