# Unable to get hits count in the Action Message

**URL:** <https://discuss.elastic.co/t/unable-to-get-hits-count-in-the-action-message/195639>\
**Category:** Kibana\
**Created:** [August 18, 2019, 9:44am UTC](https://discuss.elastic.co/t/unable-to-get-hits-count-in-the-action-message/195639 "2019-08-18T09:44:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rachit.mohan.garg](https://avatars.discourse-cdn.com/v4/letter/r/df788c/32.png) [@rachit.mohan.garg](https://discuss.elastic.co/u/rachit.mohan.garg)\
**Post date:** [August 18, 2019, 9:44am UTC](https://discuss.elastic.co/t/unable-to-get-hits-count-in-the-action-message/195639/1 "2019-08-18T09:44:54Z")

</div>

I have created a Monitor in which I have added a trigger with ctx.results[0].hits.total \> 7 condition.

In the message for Action for this trigger when I try to get the hits count by accessing {{ctx.results[0].hits.total}} it doesn't print anything.

How can I access the total in my Action message?

We are using AWS managed ElasticSearch Service

![image](https://us1.discourse-cdn.com/elastic/original/3X/6/7/67eadc0c3b96c3b595baea6dafc11450d85d7b16.png)

---

<div class="post-metadata">

**Author:** ![alisongoryachev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alisongoryachev/32/111352_2.png) [@alisongoryachev](https://discuss.elastic.co/u/alisongoryachev)\
**Post date:** [August 19, 2019, 1:43pm UTC](https://discuss.elastic.co/t/unable-to-get-hits-count-in-the-action-message/195639/2 "2019-08-19T13:43:10Z")

</div>

Hello!

You may find more success getting your issue resolved in the dedicated support medium of the specific product you are using.

---

<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:** [September 16, 2019, 1:43pm UTC](https://discuss.elastic.co/t/unable-to-get-hits-count-in-the-action-message/195639/3 "2019-09-16T13:43:19Z")

</div>

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