Is context.hits supported on 8.1

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

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