@@ -69,14 +69,14 @@ PUT _watcher/watch/error_logs_alert
6969 }
7070 },
7171 "condition" : {
72- "compare" : { "ctx.payload.hits.total.value " : { "gt" : 5 }}
72+ "compare" : { "ctx.payload.hits.total" : { "gt" : 5 }}
7373 },
7474 "actions" : {
7575 "email_administrator" : {
7676 "throttle_period": "15m", <1>
7777 "email" : { <2>
787879- "subject" : "Encountered {{ctx.payload.hits.total.value }} errors",
79+ "subject" : "Encountered {{ctx.payload.hits.total}} errors",
8080 "body" : "Too many error in the system, see attached data",
8181 "attachments" : {
8282 "attached_data" : {
@@ -119,14 +119,14 @@ PUT _watcher/watch/log_event_watch
119119 }
120120 },
121121 "condition" : {
122- "compare" : { "ctx.payload.hits.total.value " : { "gt" : 5 }}
122+ "compare" : { "ctx.payload.hits.total" : { "gt" : 5 }}
123123 },
124124 "throttle_period" : "15m", <1>
125125 "actions" : {
126126 "email_administrator" : {
127127 "email" : {
128128129- "subject" : "Encountered {{ctx.payload.hits.total.value }} errors",
129+ "subject" : "Encountered {{ctx.payload.hits.total}} errors",
130130 "body" : "Too many error in the system, see attached data",
131131 "attachments" : {
132132 "attached_data" : {
@@ -144,7 +144,7 @@ PUT _watcher/watch/log_event_watch
144144 "host" : "pager.service.domain",
145145 "port" : 1234,
146146 "path" : "/{{watch_id}}",
147- "body" : "Encountered {{ctx.payload.hits.total.value }} errors"
147+ "body" : "Encountered {{ctx.payload.hits.total}} errors"
148148 }
149149 }
150150 }
@@ -265,13 +265,13 @@ PUT _watcher/watch/log_event_watch
265265 }
266266 },
267267 "condition" : {
268- "compare" : { "ctx.payload.hits.total.value " : { "gt" : 0 } }
268+ "compare" : { "ctx.payload.hits.total" : { "gt" : 0 } }
269269 },
270270 "actions" : {
271271 "email_administrator" : {
272272 "email" : {
273273274- "subject" : "Encountered {{ctx.payload.hits.total.value }} errors",
274+ "subject" : "Encountered {{ctx.payload.hits.total}} errors",
275275 "body" : "Too many error in the system, see attached data",
276276 "attachments" : {
277277 "attached_data" : {
@@ -285,14 +285,14 @@ PUT _watcher/watch/log_event_watch
285285 },
286286 "notify_pager" : {
287287 "condition": { <1>
288- "compare" : { "ctx.payload.hits.total.value " : { "gt" : 5 } }
288+ "compare" : { "ctx.payload.hits.total" : { "gt" : 5 } }
289289 },
290290 "webhook" : {
291291 "method" : "POST",
292292 "host" : "pager.service.domain",
293293 "port" : 1234,
294294 "path" : "/{{watch_id}}",
295- "body" : "Encountered {{ctx.payload.hits.total.value }} errors"
295+ "body" : "Encountered {{ctx.payload.hits.total}} errors"
296296 }
297297 }
298298 }
0 commit comments