# Adding query parameters to filebeat?

**URL:** <https://discuss.elastic.co/t/adding-query-parameters-to-filebeat/279517>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 23, 2021, 9:51pm UTC](https://discuss.elastic.co/t/adding-query-parameters-to-filebeat/279517 "2021-07-23T21:51:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gentle\_ghost](https://avatars.discourse-cdn.com/v4/letter/g/ea5d25/32.png) [@gentle\_ghost](https://discuss.elastic.co/u/gentle_ghost)\
**Post date:** [July 23, 2021, 9:51pm UTC](https://discuss.elastic.co/t/adding-query-parameters-to-filebeat/279517/1 "2021-07-23T21:51:05Z")

</div>

Hello,

I'm adding custom routing to improve performance and the documentation for custom routing:[\_routing field | Elasticsearch Guide [7.13] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-routing-field.html)

The documentation requires the routing value whenever indexing or updating documents. Is there a way to specify the routing value parameters in filebeat? I'm a little unsure how to go about ensuring that filebeat can index documents that require a routing value.

---

<div class="post-metadata">

**Author:** ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)\
**Post date:** [July 26, 2021, 11:11am UTC](https://discuss.elastic.co/t/adding-query-parameters-to-filebeat/279517/2 "2021-07-26T11:11:08Z")

</div>

Hi!

How about adding this field to the events using [Add fields | Filebeat Reference [7.13] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/add-fields.html)?

C.

---

<div class="post-metadata">

**Author:** ![gentle\_ghost](https://avatars.discourse-cdn.com/v4/letter/g/ea5d25/32.png) [@gentle\_ghost](https://discuss.elastic.co/u/gentle_ghost)\
**Post date:** [July 26, 2021, 7:20pm UTC](https://discuss.elastic.co/t/adding-query-parameters-to-filebeat/279517/3 "2021-07-26T19:20:54Z")

</div>

Hello,

I don't think add field is what I'm looking for.

To set a route I have to add a parameter like:

`PUT my-index-000001/_doc/1?routing=user1&refresh=true`

What I'm asking is if there is an ability to set the params in filebeat. You can set the index, the pipeline, etc, but I don't see there is a way for me to add params like the routing `?routing=user1`

Thanks

---

<div class="post-metadata">

**Author:** ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)\
**Post date:** [July 27, 2021, 9:01am UTC](https://discuss.elastic.co/t/adding-query-parameters-to-filebeat/279517/4 "2021-07-27T09:01:10Z")

</div>

I see, I was assuming that adding `_routing` field into the event could do the trick...Unfortunately this option is not supported as a configuration setting. Feel free to file a Github issue for this!

---

<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:** [August 24, 2021, 11:01am UTC](https://discuss.elastic.co/t/adding-query-parameters-to-filebeat/279517/5 "2021-08-24T11:01:32Z")

</div>

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