# Configure filebeat to ship elasticsearch logs to monitoring cluster in kubernetes

**URL:** <https://discuss.elastic.co/t/configure-filebeat-to-ship-elasticsearch-logs-to-monitoring-cluster-in-kubernetes/264161>\
**Category:** Beats\
**Tags:** elastic-stack-monitoring, filebeat\
**Created:** [February 12, 2021, 5:54pm UTC](https://discuss.elastic.co/t/configure-filebeat-to-ship-elasticsearch-logs-to-monitoring-cluster-in-kubernetes/264161 "2021-02-12T17:54:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![itsron](https://avatars.discourse-cdn.com/v4/letter/i/a88e4f/32.png) [@itsron](https://discuss.elastic.co/u/itsron)\
**Post date:** [February 12, 2021, 5:54pm UTC](https://discuss.elastic.co/t/configure-filebeat-to-ship-elasticsearch-logs-to-monitoring-cluster-in-kubernetes/264161/1 "2021-02-12T17:54:04Z")

</div>

I've 2 clusters (7.10) running on Kubernetes - 1 prod and 1 monitoring. I've successfully set up metricbeat to ship elasticsearch metrics to my monitoring cluster. Now I want to ship elasticsearch logs using filebeat to my monitoring cluster. I have tried this filebeat config:

```
filebeat.modules:
  - module: elasticsearch
    server:
      enabled: true
filebeat.autodiscover:
          providers:
          - type: kubernetes
            node: ${NODE_NAME}
            templates:
              - condition:
                  contains:
                    kubernetes.container.name: "elasticsearch"
                  host: ${HOSTNAME}
                config:
                  - type: container
                    paths:
                      - "/var/log/containers/*-${data.kubernetes.container.id}.log"
                    json.keys_under_root: true
                    json.add_error_key: true
                    json.message_key: message
        
        output.elasticsearch:
          hosts: ["http://es-monitoring-master.es-monitoring.svc.cluster.local:9200"]

```

but the Stack Monitoring page on my monitoring cluster still says "No Logs Found" although I can see `filebeat` index created in my monitoring cluster. What am I missing?

---

<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:** [March 12, 2021, 7:54pm UTC](https://discuss.elastic.co/t/configure-filebeat-to-ship-elasticsearch-logs-to-monitoring-cluster-in-kubernetes/264161/2 "2021-03-12T19:54:15Z")

</div>

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