# Persistent ECS warning

**URL:** <https://discuss.elastic.co/t/persistent-ecs-warning/349743>\
**Category:** Logstash\
**Created:** [December 20, 2023, 5:00pm UTC](https://discuss.elastic.co/t/persistent-ecs-warning/349743 "2023-12-20T17:00:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Stone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_stone/32/21026_2.png) [@Chris\_Stone](https://discuss.elastic.co/u/Chris_Stone)\
**Post date:** [December 20, 2023, 5:00pm UTC](https://discuss.elastic.co/t/persistent-ecs-warning/349743/1 "2023-12-20T17:00:47Z")

</div>

logstash 8.11.3

Can anyone tell me why with the following config, and everything else at the default install, why I continue to get the `[logstash.codecs.jsonlines] ECS compatibility is enabled but `target` option was not specified. This may cause fields to be set at the top-level of the event where they are likely to clash with the Elastic Common Schema.` warning with every event?

Thanks. I know it's ignorable, but I'd rather it not fill my logs.

```auto
input {
  http {
    host => "0.0.0.0"
    port => 8080
    ssl => true
    ssl_certificate => "/etc/logstash/certs/blah/combined.pem"
    ssl_key => "/etc/logstash/certs/blah.pkcs8.key"
    user => "blah"
    password => "blahblah"
    codec => json_lines {
       charset => "UTF-8"
       target => "[document]"
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [December 20, 2023, 5:34pm UTC](https://discuss.elastic.co/t/persistent-ecs-warning/349743/2 "2023-12-20T17:34:35Z")

</div>

Check a similar issue [here](https://discuss.elastic.co/t/json-codec-plugin-target-option-http-input/304217)

---

<div class="post-metadata">

**Author:** ![Chris\_Stone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris_stone/32/21026_2.png) [@Chris\_Stone](https://discuss.elastic.co/u/Chris_Stone)\
**Post date:** [December 20, 2023, 5:45pm UTC](https://discuss.elastic.co/t/persistent-ecs-warning/349743/3 "2023-12-20T17:45:55Z")

</div>

Ah, that did it. Thanks so much @Rios .

tl;dr it's a bug; add the top line:

```auto
    additional_codecs => {}
    codec => json {
      target => "[document]"
    }

```

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [December 20, 2023, 6:03pm UTC](https://discuss.elastic.co/t/persistent-ecs-warning/349743/4 "2023-12-20T18:03:45Z")

</div>

Thanks to Badger.

---

<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 17, 2024, 6:04pm UTC](https://discuss.elastic.co/t/persistent-ecs-warning/349743/5 "2024-01-17T18:04:02Z")

</div>

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