Send link to search in slack

Hi,

Is it possible to send a link with the search that will match the watcher that has been triggered with the slack message?

Or any similar way to easily find the errors in kibana when getting the slack notification.

Thanks,
Isaac

Hey,

that depends how you wrote your query. If you are using the query_stringquery, you could create a proper link to the dashboard or the discover tab (just check how the URL's are constructed) and embed that into the slack message, as this query is used in kibana as well. if you used another query, that is not possible.

Hope this helps.

--Alex

Hi Alex,

thanks, we are not using query string, but it's not a problem to change the query into it.

Cheers,
Isaac

I'm trying to get a few values out of the watcher event, same way I did for hits and I'm not being able to get them.
For hits I'm using:
{{ctx.payload.hits.total}}
Not sure if they are not available or if I'm using the wrong syntax.
The two fields are:
result.input.search.request.body.query.bool.must.query_string.query
result.execution_time

Are those available?

Thanks,
Isaac

Hey,

you cannot extract the query, as the query is in the request, but not in the response. You would need to duplicate that. Execution time is available though.

Hope this helps!

--Alex

Hi Alex,

it helps thanks!
It's a bit annoying because we need to remember to update the search in two places but does the job.

Cheers,
Isaac

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