k8s daemonset filebeat stop harvesting log after a while.
I started daemonset filebeat in my k8s cluster to collect my Java logs
filebeat-version: 8.3.3
My configmap content is as follows
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
data:
filebeat.yml: |-
# To enable hints based autodiscover, remove `filebeat.inputs` configuration and uncomment this:
filebeat.autodiscover:
providers:
- type: kubernetes
node: ${NODE_NAME}
hints.enabled: true
hints.default_config:
enabled: false
type: log
paths:
- /var/lib/kubelet/pods/${data.kubernetes.pod.uid}/volumes/kubernetes.io~empty-dir/log-dir/*.log
- /var/lib/kubelet/pods/${data.kubernetes.pod.uid}/volumes/kubernetes.io~empty-dir/log-dir/elk/*.log
output.kafka:
hosts: ["host1:9092","host2:9092","host3:9092"]
topic: "k8s-logging_%{[kubernetes.labels.env]}"
Has anyone ever encountered such a situation?