# K8s daemonset filebeat stop harvesting log after a while

**URL:** <https://discuss.elastic.co/t/k8s-daemonset-filebeat-stop-harvesting-log-after-a-while/350839>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [January 11, 2024, 9:07am UTC](https://discuss.elastic.co/t/k8s-daemonset-filebeat-stop-harvesting-log-after-a-while/350839 "2024-01-11T09:07:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sailorqh0321](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sailorqh0321/32/130673_2.png) [@sailorqh0321](https://discuss.elastic.co/u/sailorqh0321)\
**Post date:** [January 11, 2024, 9:07am UTC](https://discuss.elastic.co/t/k8s-daemonset-filebeat-stop-harvesting-log-after-a-while/350839/1 "2024-01-11T09:07:26Z")

</div>

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

```auto
---
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？

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 8, 2024, 11:07am UTC](https://discuss.elastic.co/t/k8s-daemonset-filebeat-stop-harvesting-log-after-a-while/350839/2 "2024-02-08T11:07:55Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
