# How to parse additional kubernetes pods with json fomat logs?

**URL:** <https://discuss.elastic.co/t/how-to-parse-additional-kubernetes-pods-with-json-fomat-logs/293124>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 29, 2021, 1:45pm UTC](https://discuss.elastic.co/t/how-to-parse-additional-kubernetes-pods-with-json-fomat-logs/293124 "2021-12-29T13:45:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarabhavi](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@tarabhavi](https://discuss.elastic.co/u/tarabhavi)\
**Post date:** [December 29, 2021, 1:45pm UTC](https://discuss.elastic.co/t/how-to-parse-additional-kubernetes-pods-with-json-fomat-logs/293124/1 "2021-12-29T13:45:11Z")

</div>

I have a ELK stack with Filebeat as an agent. Works great for collecting logs of existing pods.  
**Here is the helm values for filebeat**

```auto
filebeatConfig:
  filebeat.yml: |
    logging.level: error
    filebeat.autodiscover:
      providers:
        - type: kubernetes
          node: ${NODE_NAME}
          hints.enabled: true
          hints.default_config:
            type: container
            paths:
              - /var/log/containers/*${data.kubernetes.container.id}.log
            
    output.logstash:
      hosts: 'logstash-logstash.logging.svc.cluster.local:5044'

    setup.template:
      name: "k8s"
      pattern: "k8s-*"
      enabled: false

    setup.ilm.enabled: false

```

Now, I have a new Kubernetes deployment of falco , whose logs are in json format and want to ship it to ELK stack but not able to with this config. How can I possibly do it, not able to figure out the right way.

Tried following that didn't work

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

```

---

<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:** [January 26, 2022, 3:45pm UTC](https://discuss.elastic.co/t/how-to-parse-additional-kubernetes-pods-with-json-fomat-logs/293124/2 "2022-01-26T15:45:51Z")

</div>

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