Watcher - How to reference an index field value in an email body

I would like to trigger a watcher alert using Kibana Watcher UI.

The condition works fine but I would like to give additional information in the email body. In my case the watcher will triggered when a transaction duration of 20 seconds has been exceeded.

I tried as follows in the body section but it won't work:

The following transaction took over 20sec: [{{#ctx.payload._value}}{{url.path}}]

Could somebody give me a hint how to insert values (in my case: /rest/analytics/receive) of a specific field (in my case: url.path) from the index in the email body?

The error message is: "Failed to send email to"

Thanks!

the problem here, is that you are trying to open a list element in mustache using #, but you are not closing it. Also, if you try to access fields from the source of a document you can use something like ctx.payload.hits.hits.0._source.uri.path - everything below ctx.payload resembles the path of a search response.

hope this helps.

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