# Kibana Alerting Trigger Condition Evaluate a Value

**URL:** <https://forum.opensearch.org/t/kibana-alerting-trigger-condition-evaluate-a-value/6300>\
**Category:** Alerting\
**Created:** [June 21, 2021, 10:40pm UTC](https://forum.opensearch.org/t/kibana-alerting-trigger-condition-evaluate-a-value/6300 "2021-06-21T22:40:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sushmamagesh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sushmamagesh](https://forum.opensearch.org/u/sushmamagesh)\
**Post date:** [June 21, 2021, 10:40pm UTC](https://forum.opensearch.org/t/kibana-alerting-trigger-condition-evaluate-a-value/6300/1 "2021-06-21T22:40:49Z")

</div>

Hi,

How do I store the value from the trigger condition so I can use it in the action section. For example  
My trigger condition:

ctx.results[0].hits.total.value/100 \> 0

Action Message:

Monitor {{ctx.monitor.name}} just entered alert status. Please investigate the issue.

- Trigger: {{ctx.trigger.name}}
- Severity: {{ctx.trigger.severity}}
- Count: {{ctx.results.0.hits.total.value}}
- Count Ratio: {{ctx.results.0.hits.total.value/100}}

Preview:  
Monitor test just entered alert status. Please investigate the issue.

- Trigger: test
- Severity: 1
- Count: 982
- Count Ratio:

I would like to get the value of “ctx.results.0.hits.total.value/100” in the message.

---

<div class="post-metadata">

**Author:** ![searchymcsearchface](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/searchymcsearchface/32/868_2.png) [@searchymcsearchface](https://forum.opensearch.org/u/searchymcsearchface)\
**Post date:** [June 22, 2021, 2:16pm UTC](https://forum.opensearch.org/t/kibana-alerting-trigger-condition-evaluate-a-value/6300/2 "2021-06-22T14:16:27Z")

</div>

[Welcome @sushmamagesh - I’ve moved your question to the Alerting category]

---

<div class="post-metadata">

**Author:** ![qreshi](https://avatars.discourse-cdn.com/v4/letter/q/aca169/32.png) [@qreshi](https://forum.opensearch.org/u/qreshi)\
**Post date:** [July 7, 2021, 5:20pm UTC](https://forum.opensearch.org/t/kibana-alerting-trigger-condition-evaluate-a-value/6300/3 "2021-07-07T17:20:21Z")

</div>

Hi @sushmamagesh,

Unfortunately, arithmetic operations cannot be done within the mustache template as far as I’m aware.

If you were dealing with the per-document fields, one workaround could have been to use script fields and perform the operation through that so you could have access to it in the `ctx` when defining the Action message. However, I don’t think `hits.total.value` is available there since it’s a value outside of the document.
