I am using Kibana 7.8 and below is the result of my POST _xpack/watcher/watch/949f7606-97dc-42ce-86b7-ddcf5a77d804/_execute
"result" : {
"execution_time" : "2020-10-06T23:40:33.976Z",
"execution_duration" : 11944,
"input" : {
"type" : "search",
"status" : "success",
"payload" : {
"_shards" : {
"total" : 1,
"failed" : 0,
"successful" : 1,
"skipped" : 0
},
"hits" : {
"hits" : [
{
"_index" : "apm-retmon",
"_type" : "_doc",
"_source" : {
"labels.ServiceStatus" : "2",
"labels.LatLong" : "41.378197,-81.462354",
"labels.StoreNum" : "101",
"labels.OrgHier" : {
"OrgId" : 1000,
"RegsterNum" : "1",
"Store" : "101",
"Region" : "West",
"District" : "1"
},```
*****************************************************
I have the below script in my watcher. I am not able to get the value of labels.ServiceStatus using below script . What is the correct syntax.
``` "subject": "Watcher Notification",
"body": {
"html": "{{#ctx.payload.hits.hits}} {{_source.labels.ServiceStatus}} {{/ctx.payload.hits.hits}}"
}```