# Mustache Split String

**URL:** <https://discuss.elastic.co/t/mustache-split-string/274347>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [May 28, 2021, 1:05pm UTC](https://discuss.elastic.co/t/mustache-split-string/274347 "2021-05-28T13:05:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dzious](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Dzious](https://discuss.elastic.co/u/Dzious)\
**Post date:** [May 28, 2021, 1:05pm UTC](https://discuss.elastic.co/t/mustache-split-string/274347/1 "2021-05-28T13:05:49Z")

</div>

Hi,

I'm currently struggling with kibana alerting.  
I've made a Log threshold alert that's working fine but i would need, in my final document, to have values from `context.group` split in multiples fields (split char would be `,`).  
From what i understood i can use mustache to do so since i should be able to add JS to it but i didn't find any clue on how to do so.  
I was also wondering, is it possible to do so without adding JS and by only using templates ?

Thanks by advance for your help.

---

<div class="post-metadata">

**Author:** ![Patrick\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrick_mueller/32/109425_2.png) [@Patrick\_Mueller](https://discuss.elastic.co/u/Patrick_Mueller)\
**Post date:** [June 1, 2021, 7:01pm UTC](https://discuss.elastic.co/t/mustache-split-string/274347/2 "2021-06-01T19:01:43Z")

</div>

> [@Dzious](#):
>
> From what i understood i can use mustache to do so since i should be able to add JS to it but i didn't find any clue on how to do so.

Currently there is no way to add additional mustache processing, so I don't believe you can perform a "split" the way you are thinking of. Until we have such a capability, the "split" would need to be provided by the alert itself. I'm not seeing that variables like that are currently available, but I'm not completely familiar with this alert type.

I think the best thing to do at this point is to create an issue in Kibana for this, as a feature request. [Sign in to GitHub · GitHub](https://github.com/elastic/kibana/issues/new)

---

<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:** [June 29, 2021, 7:02pm UTC](https://discuss.elastic.co/t/mustache-split-string/274347/3 "2021-06-29T19:02:08Z")

</div>

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