diff --git a/docs/spec/v1beta1/provider.md b/docs/spec/v1beta1/provider.md index 204c18582..00aac0a24 100644 --- a/docs/spec/v1beta1/provider.md +++ b/docs/spec/v1beta1/provider.md @@ -334,6 +334,7 @@ The provider will send the following labels for the event. | ----------- | -------------------------------------------------------------------------------------------------- | | alertname | The string Flux followed by the Kind and the reason for the event e.g FluxKustomizationProgressing | | severity | The severity of the event (error|info) | +| timestamp | The timestamp of the event | | reason | The machine readable reason for the objects transition into the current status | | kind | The kind of the involved object associated with the event | | name | The name of the involved object associated with the event | diff --git a/internal/notifier/alertmanager.go b/internal/notifier/alertmanager.go index 0051b3184..efee975ff 100644 --- a/internal/notifier/alertmanager.go +++ b/internal/notifier/alertmanager.go @@ -72,6 +72,7 @@ func (s *Alertmanager) Post(event events.Event) error { labels["alertname"] = "Flux" + event.InvolvedObject.Kind + strings.Title(event.Reason) labels["severity"] = event.Severity labels["reason"] = event.Reason + labels["timestamp"] = event.Timestamp.String() labels["kind"] = event.InvolvedObject.Kind labels["name"] = event.InvolvedObject.Name