# What kind of special parameters can be used in filebeat.yml?

**URL:** <https://discuss.elastic.co/t/what-kind-of-special-parameters-can-be-used-in-filebeat-yml/70321>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 31, 2016, 10:50pm UTC](https://discuss.elastic.co/t/what-kind-of-special-parameters-can-be-used-in-filebeat-yml/70321 "2016-12-31T22:50:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![meetyg](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@meetyg](https://discuss.elastic.co/u/meetyg)\
**Post date:** [December 31, 2016, 10:50pm UTC](https://discuss.elastic.co/t/what-kind-of-special-parameters-can-be-used-in-filebeat-yml/70321/1 "2016-12-31T22:50:59Z")

</div>

Hello,  
Its a bit unclear what kind of special parameters can be used in filebeat.yml  
Specificly, I'm reffering to parameters of the elasticsearch output section.  
For example the index name can be set with date:  
`index: 'filebeat-%{+yyyy.MM.dd}'`

Another example I saw in some other discussion is that I can refer to fields from the log output.

My question is what else can be done with the % sign? Can I write some Go (or other language) code? For example to get a substring from a field value, and that will be part of the index name?

Thanks.

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [December 31, 2016, 11:08pm UTC](https://discuss.elastic.co/t/what-kind-of-special-parameters-can-be-used-in-filebeat-yml/70321/2 "2016-12-31T23:08:32Z")

</div>

Have you read the documentation section for the "Config file format"? There is a section addressing [format strings](https://www.elastic.co/guide/en/beats/libbeat/current/config-file-format-type.html#_format_string_sprintf) that says how to use parameters and how to format dates. Hopefully that helps if you haven't seen it.

---

<div class="post-metadata">

**Author:** ![meetyg](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@meetyg](https://discuss.elastic.co/u/meetyg)\
**Post date:** [January 1, 2017, 3:52am UTC](https://discuss.elastic.co/t/what-kind-of-special-parameters-can-be-used-in-filebeat-yml/70321/3 "2017-01-01T03:52:58Z")

</div>

Thanks Andrew, thats what I was looking for.  
I guess I missed it because I was looking specifically at the Filebeat  
documentation. I think I'll have a look at the Beats documentation to see  
that I haven't skipped some more important info, like the above.

---

<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 29, 2017, 3:53am UTC](https://discuss.elastic.co/t/what-kind-of-special-parameters-can-be-used-in-filebeat-yml/70321/4 "2017-01-29T03:53:03Z")

</div>

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