Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Correctly read total hits inside watcher config #50614

Merged
merged 1 commit into from
Jan 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions x-pack/docs/en/watcher/actions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ PUT _watcher/watch/error_logs_alert
}
},
"condition" : {
"compare" : { "ctx.payload.hits.total.value" : { "gt" : 5 }}
"compare" : { "ctx.payload.hits.total" : { "gt" : 5 }}
},
"actions" : {
"email_administrator" : {
"throttle_period": "15m", <1>
"email" : { <2>
"to" : "sys.admino@host.domain",
"subject" : "Encountered {{ctx.payload.hits.total.value}} errors",
"subject" : "Encountered {{ctx.payload.hits.total}} errors",
"body" : "Too many error in the system, see attached data",
"attachments" : {
"attached_data" : {
Expand Down Expand Up @@ -119,14 +119,14 @@ PUT _watcher/watch/log_event_watch
}
},
"condition" : {
"compare" : { "ctx.payload.hits.total.value" : { "gt" : 5 }}
"compare" : { "ctx.payload.hits.total" : { "gt" : 5 }}
},
"throttle_period" : "15m", <1>
"actions" : {
"email_administrator" : {
"email" : {
"to" : "sys.admino@host.domain",
"subject" : "Encountered {{ctx.payload.hits.total.value}} errors",
"subject" : "Encountered {{ctx.payload.hits.total}} errors",
"body" : "Too many error in the system, see attached data",
"attachments" : {
"attached_data" : {
Expand All @@ -144,7 +144,7 @@ PUT _watcher/watch/log_event_watch
"host" : "pager.service.domain",
"port" : 1234,
"path" : "/{{watch_id}}",
"body" : "Encountered {{ctx.payload.hits.total.value}} errors"
"body" : "Encountered {{ctx.payload.hits.total}} errors"
}
}
}
Expand Down Expand Up @@ -265,13 +265,13 @@ PUT _watcher/watch/log_event_watch
}
},
"condition" : {
"compare" : { "ctx.payload.hits.total.value" : { "gt" : 0 } }
"compare" : { "ctx.payload.hits.total" : { "gt" : 0 } }
},
"actions" : {
"email_administrator" : {
"email" : {
"to" : "sys.admino@host.domain",
"subject" : "Encountered {{ctx.payload.hits.total.value}} errors",
"subject" : "Encountered {{ctx.payload.hits.total}} errors",
"body" : "Too many error in the system, see attached data",
"attachments" : {
"attached_data" : {
Expand All @@ -285,14 +285,14 @@ PUT _watcher/watch/log_event_watch
},
"notify_pager" : {
"condition": { <1>
"compare" : { "ctx.payload.hits.total.value" : { "gt" : 5 } }
"compare" : { "ctx.payload.hits.total" : { "gt" : 5 } }
},
"webhook" : {
"method" : "POST",
"host" : "pager.service.domain",
"port" : 1234,
"path" : "/{{watch_id}}",
"body" : "Encountered {{ctx.payload.hits.total.value}} errors"
"body" : "Encountered {{ctx.payload.hits.total}} errors"
}
}
}
Expand Down