Hi,
I am fetching volume information from kubernetes cluster.
The labels are missing in the metricbeat event:
{
"@timestamp": "2019-08-20T10:39:59.823Z",
"@metadata": {
"beat": "metricbeat",
"type": "_doc",
"version": "7.3.0"
},
"host": {
"name": "server"
},
"event": {
"dataset": "kubernetes.volume",
"module": "kubernetes",
"duration": 54769839
},
"metricset": {
"name": "volume"
},
"service": {
"address": "localhost:10255",
"type": "kubernetes"
},
"kubernetes": {
"volume": {
"_module": {
"pod": {
"name": "poc-redis-0"
},
"namespace": "default",
"node": {
"name": "server"
}
},
"name": "redis-database-store",
"fs": {
"available": {
"bytes": 29895442432
},
"capacity": {
"bytes": 31572529152
},
"used": {
"bytes": 49696768
},
"inodes": {
"count": 1966080,
"used": 12,
"free": 1966068
}
}
}
},
"agent": {
"hostname": "server",
"id": "6e59cee0-fc61-448e-b5f8-e6f069bc3cba",
"version": "7.3.0",
"type": "metricbeat",
"ephemeral_id": "1577b3e5-85cc-43db-8570-5de6e817a52a"
},
"ecs": {
"version": "1.0.1"
}
}
But in Kubernetes PVC and PV are labeled:
kubectl describe pvc redis-database-store-poc-redis-0
Name: redis-database-store-poc-redis-0
Namespace: default
StorageClass: local-storage
Status: Bound
Volume: poc-redis
Labels: appl=redis
cluster=poc
type=pvc
Annotations: pv.kubernetes.io/bind-completed: yes
pv.kubernetes.io/bound-by-controller: yes
Finalizers: [kubernetes.io/pvc-protection]
Capacity: 30Gi
Access Modes: RWO
VolumeMode: Filesystem
Events: <none>
Mounted By: poc-redis-0
kubectl describe pv poc-redis
Name: poc-redis
Labels: appl=redis
cluster=poc
part-of=elasticStack
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"PersistentVolume","metadata":{"annotations":{},"labels":{"appl":"redis","cluster":"poc","part-of":"elasticStack...
pv.kubernetes.io/bound-by-controller: yes
Finalizers: [kubernetes.io/pv-protection]
StorageClass: local-storage
Status: Bound
Claim: default/redis-database-store-poc-redis-0
Reclaim Policy: Delete
Access Modes: RWO
VolumeMode: Filesystem
Capacity: 30Gi
Node Affinity:
Required Terms:
Term 0: kubernetes.io/hostname in [server]
Message:
Source:
Type: LocalVolume (a persistent volume backed by local storage on a node)
Path: /kubernetes_local_storage/poc-redis
Is there any flag I missed to set?