diff --git a/AlertmanagerIntegration.js b/AlertmanagerIntegration.js index c94e4a1..1777044 100644 --- a/AlertmanagerIntegration.js +++ b/AlertmanagerIntegration.js @@ -1,7 +1,7 @@ class Script { process_incoming_request({ - request - }) { + request + }) { console.log(request.content); var alertColor = "warning"; @@ -16,7 +16,7 @@ class Script { var endVal = request.content.alerts[i]; var elem = { title: "alertname: " + endVal.labels.alertname, - value: "*instance:* " + endVal.labels.instance, + value: "*Prometheus:* " + endVal.labels.prometheus, short: false }; @@ -24,22 +24,22 @@ class Script { if (!!endVal.annotations.summary) { finFields.push({ - title: "summary", + title: "Summary", value: endVal.annotations.summary }); } if (!!endVal.annotations.severity) { finFields.push({ - title: "severity", + title: "Severity", value: endVal.annotations.severity }); } - if (!!endVal.annotations.description) { + if (!!endVal.annotations.message) { finFields.push({ - title: "description", - value: endVal.annotations.description + title: "Description", + value: endVal.annotations.message }); } }