# Is context.hits supported on 8.1

**URL:** <https://discuss.elastic.co/t/is-context-hits-supported-on-8-1/334105>\
**Category:** Kibana\
**Created:** [May 23, 2023, 10:39am UTC](https://discuss.elastic.co/t/is-context-hits-supported-on-8-1/334105 "2023-05-23T10:39:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitisha](https://avatars.discourse-cdn.com/v4/letter/n/6de8d8/32.png) [@nitisha](https://discuss.elastic.co/u/nitisha)\
**Post date:** [May 23, 2023, 10:39am UTC](https://discuss.elastic.co/t/is-context-hits-supported-on-8-1/334105/1 "2023-05-23T10:39:20Z")

</div>

Hi Team,

Is context.hits supported on kibana version 8.1?

I am using "Rules and Connectors" type as "Inventory" to monitor CPU metric threshold. With the default action rule {{alertName}} - {{context.group}} is in a state of {{context.alertState}} {{context.reason}}, I am receiving the notification in the correct format.

However, the above notification shows the container ID and I am interested in retrieving container name.

With the help of mustache template tester, I have modified the above action rule and appended with -

{{#context.hits}}  
name: {{\_source.container.name}}  
{{/context.hits}}

I don't see any change in the notification message neither do I see the "name" key in the message.

I have also tried using {{.}} between context.hits to list all available json fields but it doesn't show anything either.

Please let me know if I am doing something wrong or is there any other alternative to retrieve the container name?

Thanks,  
Nitish

---

<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 22, 2023, 11:19am UTC](https://discuss.elastic.co/t/is-context-hits-supported-on-8-1/334105/3 "2023-06-22T11:19:27Z")

</div>

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