From 4d7d13175c45b6c06c85d3ffe477db4137bee4a7 Mon Sep 17 00:00:00 2001 From: stratomonitor Date: Thu, 7 Nov 2019 13:08:58 +0100 Subject: [PATCH] Alerting: Add alert_state to the kafka message Fixes #11401 (#20099) * Notifications: Add alert_state to the kafka message Fixes #11401 --- pkg/services/alerting/notifiers/kafka.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/services/alerting/notifiers/kafka.go b/pkg/services/alerting/notifiers/kafka.go index ed795453c42..e557bdb2414 100644 --- a/pkg/services/alerting/notifiers/kafka.go +++ b/pkg/services/alerting/notifiers/kafka.go @@ -75,6 +75,8 @@ func (kn *KafkaNotifier) Notify(evalContext *alerting.EvalContext) error { records := make([]interface{}, 1) bodyJSON := simplejson.New() + //get alert state in the kafka output issue #11401 + bodyJSON.Set("alert_state", state) bodyJSON.Set("description", evalContext.Rule.Name+" - "+evalContext.Rule.Message) bodyJSON.Set("client", "Grafana") bodyJSON.Set("details", customData)