Alerting: State Manager takes screenshots. (#49338)

The State Manager will now take screenshots when an alert instance
switches to an Alerting or Resolved state.

Signed-off-by: Joe Blubaugh joe.blubaugh@grafana.com
This commit is contained in:
Joe Blubaugh
2022-05-23 10:53:41 +08:00
committed by GitHub
parent 687e79538b
commit 1d724810de
8 changed files with 190 additions and 17 deletions

View File

@@ -81,6 +81,10 @@ const (
// Annotations are actually a set of labels, so technically this is the label name of an annotation.
DashboardUIDAnnotation = "__dashboardUid__"
PanelIDAnnotation = "__panelId__"
// This isn't a hard-coded secret token, hence the nolint.
//nolint:gosec
ScreenshotTokenAnnotation = "__alertScreenshotToken__"
)
var (
@@ -89,7 +93,11 @@ var (
RuleUIDLabel: {},
NamespaceUIDLabel: {},
}
InternalAnnotationNameSet = map[string]struct{}{}
InternalAnnotationNameSet = map[string]struct{}{
DashboardUIDAnnotation: {},
PanelIDAnnotation: {},
ScreenshotTokenAnnotation: {},
}
)
// AlertRule is the model for alert rules in unified alerting.