# Custom userAgent regexes.yaml

**URL:** <https://discuss.elastic.co/t/custom-useragent-regexes-yaml/155610>\
**Category:** Logstash\
**Created:** [November 6, 2018, 7:55pm UTC](https://discuss.elastic.co/t/custom-useragent-regexes-yaml/155610 "2018-11-06T19:55:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![he11oworld](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/he11oworld/32/58196_2.png) [@he11oworld](https://discuss.elastic.co/u/he11oworld)\
**Post date:** [November 6, 2018, 7:55pm UTC](https://discuss.elastic.co/t/custom-useragent-regexes-yaml/155610/1 "2018-11-06T19:55:08Z")

</div>

I want to add a small snippet to the default regexes.yaml, but that would mean adding the whole regexes.yaml to configmap, is there a way for userAgent plugin to parse from two different sources?(my custom regex and additionally and the default file). Is there any other workaround for this?

---

<div class="post-metadata">

**Author:** ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)\
**Post date:** [November 6, 2018, 8:15pm UTC](https://discuss.elastic.co/t/custom-useragent-regexes-yaml/155610/2 "2018-11-06T20:15:01Z")

</div>

The [`regexes` directive](https://www.elastic.co/guide/en/logstash/current/plugins-filters-useragent.html#plugins-filters-useragent-regexes) takes a _path_ to a yaml file, and doesn't need you to specify a giant blob of yaml in-line. You should be able to copy the regexes.yaml, save a copy with your modifications, and point to it in the plugin configuration.

---

<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:** [December 4, 2018, 8:15pm UTC](https://discuss.elastic.co/t/custom-useragent-regexes-yaml/155610/3 "2018-12-04T20:15:09Z")

</div>

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