I am trying to construct a watcher that uses the strings defined in the simple input section and places them into the search input section so I can rapidly create multiple watchers by only having to change the simple input section. In my json, I pass in the simple inputs into the parameters of my search template but it interprets it literally as a string. How can I force it to substitute the variable as the query? Below is example json of my watcher where I try and pass in the simple inputs:
//my Watcher JSON
"input": {
"chain": {
"inputs": [
{
"first": {
"simple": {
"process": "java"
}
}
},
{
"second": {
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"metricbeat-2018-11-13"
],
"types": ,
"template": {
"id": "Template",
"params": {
"ctx_payload_first_process": "{{ctx.payload.first.process}}"
}
}
}
}
}
}
]
}
},
When I run the above code, it interprets it as {{ctx.payload.first.process}} and not java