@@ -69,14 +69,14 @@ PUT _watcher/watch/error_logs_alert
69
69
}
70
70
},
71
71
"condition" : {
72
- "compare" : { "ctx.payload.hits.total.value " : { "gt" : 5 }}
72
+ "compare" : { "ctx.payload.hits.total" : { "gt" : 5 }}
73
73
},
74
74
"actions" : {
75
75
"email_administrator" : {
76
76
"throttle_period": "15m", <1>
77
77
"email" : { <2>
78
78
79
- "subject" : "Encountered {{ctx.payload.hits.total.value }} errors",
79
+ "subject" : "Encountered {{ctx.payload.hits.total}} errors",
80
80
"body" : "Too many error in the system, see attached data",
81
81
"attachments" : {
82
82
"attached_data" : {
@@ -119,14 +119,14 @@ PUT _watcher/watch/log_event_watch
119
119
}
120
120
},
121
121
"condition" : {
122
- "compare" : { "ctx.payload.hits.total.value " : { "gt" : 5 }}
122
+ "compare" : { "ctx.payload.hits.total" : { "gt" : 5 }}
123
123
},
124
124
"throttle_period" : "15m", <1>
125
125
"actions" : {
126
126
"email_administrator" : {
127
127
"email" : {
128
128
129
- "subject" : "Encountered {{ctx.payload.hits.total.value }} errors",
129
+ "subject" : "Encountered {{ctx.payload.hits.total}} errors",
130
130
"body" : "Too many error in the system, see attached data",
131
131
"attachments" : {
132
132
"attached_data" : {
@@ -144,7 +144,7 @@ PUT _watcher/watch/log_event_watch
144
144
"host" : "pager.service.domain",
145
145
"port" : 1234,
146
146
"path" : "/{{watch_id}}",
147
- "body" : "Encountered {{ctx.payload.hits.total.value }} errors"
147
+ "body" : "Encountered {{ctx.payload.hits.total}} errors"
148
148
}
149
149
}
150
150
}
@@ -265,13 +265,13 @@ PUT _watcher/watch/log_event_watch
265
265
}
266
266
},
267
267
"condition" : {
268
- "compare" : { "ctx.payload.hits.total.value " : { "gt" : 0 } }
268
+ "compare" : { "ctx.payload.hits.total" : { "gt" : 0 } }
269
269
},
270
270
"actions" : {
271
271
"email_administrator" : {
272
272
"email" : {
273
273
274
- "subject" : "Encountered {{ctx.payload.hits.total.value }} errors",
274
+ "subject" : "Encountered {{ctx.payload.hits.total}} errors",
275
275
"body" : "Too many error in the system, see attached data",
276
276
"attachments" : {
277
277
"attached_data" : {
@@ -285,14 +285,14 @@ PUT _watcher/watch/log_event_watch
285
285
},
286
286
"notify_pager" : {
287
287
"condition": { <1>
288
- "compare" : { "ctx.payload.hits.total.value " : { "gt" : 5 } }
288
+ "compare" : { "ctx.payload.hits.total" : { "gt" : 5 } }
289
289
},
290
290
"webhook" : {
291
291
"method" : "POST",
292
292
"host" : "pager.service.domain",
293
293
"port" : 1234,
294
294
"path" : "/{{watch_id}}",
295
- "body" : "Encountered {{ctx.payload.hits.total.value }} errors"
295
+ "body" : "Encountered {{ctx.payload.hits.total}} errors"
296
296
}
297
297
}
298
298
}
0 commit comments