# Kibana.alert.reason in actions

**URL:** <https://discuss.elastic.co/t/kibana-alert-reason-in-actions/290081>\
**Category:** Elastic Security\
**Created:** [November 24, 2021, 2:35pm UTC](https://discuss.elastic.co/t/kibana-alert-reason-in-actions/290081 "2021-11-24T14:35:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![probson](https://avatars.discourse-cdn.com/v4/letter/p/e47c2d/32.png) [@probson](https://discuss.elastic.co/u/probson)\
**Post date:** [November 24, 2021, 2:35pm UTC](https://discuss.elastic.co/t/kibana-alert-reason-in-actions/290081/1 "2021-11-24T14:35:46Z")

</div>

Is it possible to use kibana.alert.reason within the actions. I have tried

```auto
	{{#context.alerts}}{{kibana.alert.reason}}{{/context.alerts}}

```

---

<div class="post-metadata">

**Author:** ![spong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spong/32/54343_2.png) [@spong](https://discuss.elastic.co/u/spong)\
**Post date:** [December 9, 2021, 11:10pm UTC](https://discuss.elastic.co/t/kibana-alert-reason-in-actions/290081/2 "2021-12-09T23:10:50Z")

</div>

Hey there @probson! 👋

So I just tested this on an `8.0` snapshot and am seeing it work, so my guess it has to do with the [field aliasing](https://github.com/elastic/kibana/blob/7.16/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/signal_aad_mapping.json#L29) between `kibana.alert.reason` and `signal.reason` for `pre-8.x`. Looking at the [source](https://github.com/elastic/kibana/blob/7.16/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_bulk_body.ts#L186) for `7.16`, it looks like reason is being set on `signal.reason`, so you should be able to use that to access the reason in actions, ala:

```auto
{{#context.alerts}}{{signal.reason}}{{/context.alerts}}

```

Let me know if that doesn't work (and your Kibana version), and happy to dig further! Cheers! 🙂

---

<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 6, 2022, 11:11pm UTC](https://discuss.elastic.co/t/kibana-alert-reason-in-actions/290081/3 "2022-01-06T23:11:34Z")

</div>

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