Alerting: Add alert_state to the kafka message Fixes #11401 (#20099)

* Notifications: Add alert_state to the kafka message Fixes #11401
This commit is contained in:
stratomonitor 2019-11-07 13:08:58 +01:00 committed by Sofia Papagiannaki
parent 96dbed5efc
commit 4d7d13175c

View File

@ -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)