Dynamic Variable in Query - Match Phrase

alerting

(Dinesh) #1

I was using kibana watcher for monitoring and alerts. In Watcher i have used the user defined variable in the condition script(painless script) and it is working fine. Is there any ways i can use a variable in http request query using user defined variable for a match phrase.

Sample:

"query": {
"match" : {
"message" : "this is a test"
}
}
Expectation:
"query": {
"match" : {
"message" : user defined variable
}
}


(Alexander Reelsen) #2

Hey,

I am not sure if you are referring to a HTTP request or a search request. However you can use variables from the watch metadata like {{ctx.metadata.my_metadata_variable}}.

If you share your full watch, taking a closer look might be easier.

--Alex


(system) #3

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