# Mapping conflict with Elastic Agent

**URL:** <https://discuss.elastic.co/t/mapping-conflict-with-elastic-agent/298677>\
**Category:** Elasticsearch\
**Tags:** elastic-agent\
**Created:** [March 2, 2022, 9:57pm UTC](https://discuss.elastic.co/t/mapping-conflict-with-elastic-agent/298677 "2022-03-02T21:57:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ARDiver86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ardiver86/32/85266_2.png) [@ARDiver86](https://discuss.elastic.co/u/ARDiver86)\
**Post date:** [March 2, 2022, 9:57pm UTC](https://discuss.elastic.co/t/mapping-conflict-with-elastic-agent/298677/1 "2022-03-02T21:57:06Z")

</div>

I am using the Fleet server with policies/integrations but I am running into some mapping conflicts that I am unsure how to resolve. For my "logs-\*" index pattern I see I have a conflict of keyword,object on the "source" field.

The strange part is all of these keyword types are coming from the .ds-logs-elastic\_agent.filebeat- indices. This makes me thing it is something to do with the IIS integration I have enabled because the two namespaces are one of the few that have an IIS integration.

How does someone go about correcting this mapping conflict? This is causing me to lose GEO data. I have a support ticket open but it has been going over for quite a while and I'm trying to find other sources of assistance to resolve this.

The mappings in conflict are:

```auto
.ds-logs-elastic_agent.filebeat- **** -2022.01.07-000002
.ds-logs-elastic_agent.filebeat- **** -2022.02.06-000004
.ds-logs-elastic_agent.filebeat- ********* -2022.01.07-000003
.ds-logs-elastic_agent.filebeat- ********* -2022.02.06-000006

```

and it shows the type is keyword when it should be object:

> "source": {  
> "type": "keyword",  
> "ignore\_above": 1024  
> },

---

<div class="post-metadata">

**Author:** ![TiagoQueiroz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagoqueiroz/32/107061_2.png) [@TiagoQueiroz](https://discuss.elastic.co/u/TiagoQueiroz)\
**Post date:** [March 3, 2022, 12:11pm UTC](https://discuss.elastic.co/t/mapping-conflict-with-elastic-agent/298677/2 "2022-03-03T12:11:56Z")

</div>

Hi @ARDiver86, Filebeat sometimes logs using the `source` key with a string value that Elasticserach will understand as a `keyword` type instead of `object`. We have a GitHub issue about it: [Source keyword in log files can lead to indexation failure. · Issue #30667 · elastic/beats · GitHub](https://github.com/elastic/beats/issues/30667)

However, it's not fully clear to me which GEO data you're loosing. Is it coming from the IIS integration?

Are there events failing to be indexed? Are they from Filebeat or the IIS integration?

---

<div class="post-metadata">

**Author:** ![ARDiver86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ardiver86/32/85266_2.png) [@ARDiver86](https://discuss.elastic.co/u/ARDiver86)\
**Post date:** [March 3, 2022, 12:47pm UTC](https://discuss.elastic.co/t/mapping-conflict-with-elastic-agent/298677/3 "2022-03-03T12:47:04Z")

</div>

I have documents in other indexes where they have the source.ip column but no geo data. My assumption was the conflict was causing it not to look up the geo location because of this conflict.

This is also causing an issue where I cannot put in exceptions in the Alerts section for source.ip using lists. I should be able to make a list for IP Addresses and a put a rule in under alerts that states "if source.ip is in list " but the drop down does not populate my ip address list. We discovered that it doesnt populate the ip address list because source has a mapping conflict and is keyword.

Looking at some of the indices it says is in conflict they dont even have a source column in that index. So im confused as to why there is a conflict to begin with.

My ticket is 00865004

---

<div class="post-metadata">

**Author:** ![TiagoQueiroz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagoqueiroz/32/107061_2.png) [@TiagoQueiroz](https://discuss.elastic.co/u/TiagoQueiroz)\
**Post date:** [March 3, 2022, 2:59pm UTC](https://discuss.elastic.co/t/mapping-conflict-with-elastic-agent/298677/4 "2022-03-03T14:59:07Z")

</div>

Thanks! I'll talk to the folks looking into this ticket. I have a hunch about the root cause. I'll write back once I have something confirmed.

---

<div class="post-metadata">

**Author:** ![ARDiver86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ardiver86/32/85266_2.png) [@ARDiver86](https://discuss.elastic.co/u/ARDiver86)\
**Post date:** [March 11, 2022, 4:59pm UTC](https://discuss.elastic.co/t/mapping-conflict-with-elastic-agent/298677/5 "2022-03-11T16:59:15Z")

</div>

So I still have the issue with the mapping conflicts caused by the issue you mentioned but I managed to fix the IIS GEO issue.

It turns out the integration did not provide a pipeline so the IIS pipeline was not running on the documents being ingested. I think this may be a bug in a past version of the IIS integration because I completely removed the integration and installed it again and now the settings have a default\_pipeline supplied. However, I thought Elastic did some sort of name matching to match a ingest pipeline based on the data stream name and/or index template name. That doesn't appear to be working or it isn't working because its also comparing the - which then it wouldn't of matched a pipeline.

---

<div class="post-metadata">

**Author:** ![TiagoQueiroz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagoqueiroz/32/107061_2.png) [@TiagoQueiroz](https://discuss.elastic.co/u/TiagoQueiroz)\
**Post date:** [March 14, 2022, 11:20am UTC](https://discuss.elastic.co/t/mapping-conflict-with-elastic-agent/298677/6 "2022-03-14T11:20:08Z")

</div>

> [@ARDiver86](#):
>
> However, I thought Elastic did some sort of name matching to match a ingest pipeline based on the data stream name and/or index template name. That doesn't appear to be working or it isn't working because its also comparing the - which then it wouldn't of matched a pipeline.

I didn't quite get what you meant there, let me break down what I understood:

> However, I thought Elastic did some sort of name matching to match a ingest pipeline based on the data stream name and/or index template name.

When adding a document to Elasticsearch, the request (single or bulk) can specify which ingest pipeline to use, that is how Filebeat uses ingest pipelines, when sending the events it tells ES which pipelines to use. This is all handled by Filebeat/Elastic-Agent, you should not need to worry about it.

Are you sending data to those indexes by means other than the Elastic-Agent/Filebeat/Beats?

> That doesn't appear to be working or it isn't working because its also comparing the - which then it wouldn't of matched a pipeline.

What is being compared to what? I don't get that... What is the behaviour you are seeing and what did you expect to see?

---

<div class="post-metadata">

**Author:** ![ARDiver86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ardiver86/32/85266_2.png) [@ARDiver86](https://discuss.elastic.co/u/ARDiver86)\
**Post date:** [March 14, 2022, 1:41pm UTC](https://discuss.elastic.co/t/mapping-conflict-with-elastic-agent/298677/7 "2022-03-14T13:41:23Z")

</div>

According to the documentation: [Ingest pipelines | Elasticsearch Guide [7.17] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/ingest.html#pipelines-for-fleet-elastic-agent)

it states " Elasticsearch matches these templates to your Fleet data streams based on the [stream’s naming scheme](https://www.elastic.co/guide/en/fleet/7.17/data-streams.html#data-streams-naming-scheme)."

So what I was saying, is the ingest pipeline should be matched to the data stream just off the naming scheme. So if I have a template named "logs-msexchange.msgtracking" which created a "logs-msexchange.msgtracking-" I figured it would of matched the pipeline named "logs-msexchange.msgtracking". I'm assuming that it isn't matching due to the namespace not being in the name of the ingest pipeline.

---

<div class="post-metadata">

**Author:** ![TiagoQueiroz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagoqueiroz/32/107061_2.png) [@TiagoQueiroz](https://discuss.elastic.co/u/TiagoQueiroz)\
**Post date:** [March 15, 2022, 9:52am UTC](https://discuss.elastic.co/t/mapping-conflict-with-elastic-agent/298677/8 "2022-03-15T09:52:09Z")

</div>

First things first, this documentation you linked is regarding running Fleet and Elastic-Agent. When the Elastic-Agent is running under fleet it does a lot of work under the hood to get all the indexes, pipelines, etc working.

> [@ARDiver86](#):
>
> it states " Elasticsearch matches these templates to your Fleet data streams based on the [stream’s naming scheme](https://www.elastic.co/guide/en/fleet/7.17/data-streams.html#data-streams-naming-scheme)."

I believe you are confusing the templates this phrase refers too. Also the whole paragraph needs to be taken into consideration:

> [Fleet](https://www.elastic.co/guide/en/fleet/7.17/index.html) automatically adds ingest pipelines for its integrations. Fleet applies these pipelines using [index templates](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/index-templates.html) that include [pipeline index settings](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/ingest.html#set-default-pipeline). Elasticsearch matches these templates to your Fleet data streams based on the [stream’s naming scheme](https://www.elastic.co/guide/en/fleet/7.17/data-streams.html#data-streams-naming-scheme).

The "templates" mentioned in the bit you quoted are the [index templates](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/index-templates.html) and they're matched to the "fleet data streams" (the data streams set up by Fleet and Elastic-Agent), it does not affect all data streams.

> However, I thought Elastic did some sort of name matching to match a ingest pipeline based on the data stream name and/or index template name.

Ingest pipelines are not "auto-magically" matched by name to indexes, this configuration is explicit. When Elastic-Agent does its configuration of ingest pipelines, index templates and data streams, the observable result is that pattern matching. However if you just create ingest pipelines and indexes manually they will not be matched by name patterns.

That' one of the many advantages of using Elastic-Agent and integrations, they take care of all this heavy lifting for you.

---

<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:** [April 12, 2022, 9:52am UTC](https://discuss.elastic.co/t/mapping-conflict-with-elastic-agent/298677/9 "2022-04-12T09:52:42Z")

</div>

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