# Errors ingesting elasticsearch audit due to mapping of request.method

**URL:** <https://discuss.elastic.co/t/errors-ingesting-elasticsearch-audit-due-to-mapping-of-request-method/185967>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 16, 2019, 3:43pm UTC](https://discuss.elastic.co/t/errors-ingesting-elasticsearch-audit-due-to-mapping-of-request-method/185967 "2019-06-16T15:43:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [June 16, 2019, 3:43pm UTC](https://discuss.elastic.co/t/errors-ingesting-elasticsearch-audit-due-to-mapping-of-request-method/185967/1 "2019-06-16T15:43:36Z")

</div>

We're getting errors like this:

> "Could not dynamically add mapping for field [request.method]. Existing mapping for [elasticsearch.audit.request] must be of type object but found [keyword]."

It look like it's attempting to create a field elasticsearch.audit.request.method, but there is a keyword field in the filebeat-6.7.1 template for elasticsearch.audit.request as a keyword.

There is a section of code in the ingest pipeline filebeat-6.7.1-elasticsearch-audit-pipeline-json that looks like it should handle this:

> ```
> {
> "dot_expander" : {
> "field" : "request.method",
> "path" : "elasticsearch.audit"
> }
> },
> {
> "rename" : {
> "if" : "ctx.elasticsearch.audit?.request?.method != null",
> "field" : "elasticsearch.audit.request.method",
> "target_field" : "elasticsearch.audit.request_method"
> }
> },
> 
> ```

Any idea why the rename isn't working? Or what else could be causing the problem?

All components are 6.7.1.

Thanks

---

<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:** [July 14, 2019, 3:49pm UTC](https://discuss.elastic.co/t/errors-ingesting-elasticsearch-audit-due-to-mapping-of-request-method/185967/2 "2019-07-14T15:49:07Z")

</div>

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