# Exiting: error loading config file: yaml: line 29: did not find expected key

**URL:** <https://discuss.elastic.co/t/exiting-error-loading-config-file-yaml-line-29-did-not-find-expected-key/264816>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 19, 2021, 8:39am UTC](https://discuss.elastic.co/t/exiting-error-loading-config-file-yaml-line-29-did-not-find-expected-key/264816 "2021-02-19T08:39:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clyton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clyton/32/97303_2.png) [@Clyton](https://discuss.elastic.co/u/Clyton)\
**Post date:** [February 19, 2021, 8:39am UTC](https://discuss.elastic.co/t/exiting-error-loading-config-file-yaml-line-29-did-not-find-expected-key/264816/1 "2021-02-19T08:39:53Z")

</div>

Hi All,

I'm trying to configure kafka output based on two input location conditions, wherein I'm encountering the below error. Please advise !!

```auto
# ============================== Filebeat inputs ===============================
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log
  # Change to true to enable this input configuration.
  enabled: true
  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - /var/tmp1/*.log (line no 29)
   fields:
     type: pipeline1
- type: log
  enabled: true
  paths:
    - /var/tmp2/*.log
   fields:
     type: pipeline2

 #-------------------------------- Kafka Output --------------------------------
output.kafka:
  # Boolean flag to enable or disable the output module.
  enabled: true

  # The list of Kafka broker addresses from which to fetch the cluster metadata.
  # The cluster metadata contain the actual Kafka brokers events are published
  # to.

  hosts: ###########################################################

  # The Kafka topic used for produced events. The setting can be a format string
  # using any event field. To set the topic from document type use `%{[type]}`.

  topics:
      - topic: 'topic1'
        when:
          equals:
            type: '%{[fields.type]}'
      - topic: 'topic2'
        when:
          equals:
            type: '%{[fields.topic]}'

```

Please shed some light on it. Thanks !!

Regards,  
Clyton

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [February 19, 2021, 10:54am UTC](https://discuss.elastic.co/t/exiting-error-loading-config-file-yaml-line-29-did-not-find-expected-key/264816/2 "2021-02-19T10:54:46Z")

</div>

Hey @Clyton, welcome to discuss 🙂

What is the error your are encountering?

---

<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 19, 2021, 12:55pm UTC](https://discuss.elastic.co/t/exiting-error-loading-config-file-yaml-line-29-did-not-find-expected-key/264816/3 "2021-03-19T12:55:26Z")

</div>

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