[APM] Fix bug that causes watcher emails to fail (#19071) (#19094)

This commit is contained in:
Søren Louv-Jansen 2018-05-16 02:01:37 +02:00 committed by GitHub
parent 081c9cd521
commit 14bf833a93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ Object {
"html": "Your service \\"{{ctx.metadata.serviceName}}\\" has error groups which exceeds {{ctx.metadata.threshold}} occurrences within \\"{{ctx.metadata.timeRangeHumanReadable}}\\"<br/><br/>{{#ctx.payload.aggregations.error_groups.buckets}}<br/><strong>{{sample.hits.hits.0._source.error.log.message}}{{^sample.hits.hits.0._source.error.log.message}}{{sample.hits.hits.0._source.error.exception.message}}{{/sample.hits.hits.0._source.error.log.message}}</strong><br/>{{sample.hits.hits.0._source.error.culprit}}{{^sample.hits.hits.0._source.error.culprit}}N/A{{/sample.hits.hits.0._source.error.culprit}}<br/>{{doc_count}} occurrences<br/>{{/ctx.payload.aggregations.error_groups.buckets}}",
},
"subject": "\\"{{ctx.metadata.serviceName}}\\" has error groups which exceeds the threshold",
"to": "{{ctx.metadata.emails}}",
"to": "{{#join}}ctx.metadata.emails{{/join}}",
},
},
"log_error": Object {

View file

@ -159,7 +159,7 @@ export async function createErrorGroupWatch({
if (!isEmpty(emails)) {
body.actions.email = {
email: {
to: '{{ctx.metadata.emails}}',
to: '{{#join}}ctx.metadata.emails{{/join}}',
subject: `"{{ctx.metadata.serviceName}}" has error groups which exceeds the threshold`,
body: {
html: emailTemplate