Alerting Annotations
Defines the alerting specification for a given SLO.
// @sloth.alerting name ChatGPTAvailability
// @sloth.alerting labels severity critical
// @sloth.alerting labels system backend
// @sloth.alerting annotations tier preemptive
Running sloscribe will generate the following alerting sloth specification:
version: prometheus/v1
service: ...
labels: ...
slos:
- name: ...
description: ...
objective:
alerting:
name: ChatGPTAvailability
annotations:
tier: preemptive
labels:
severity: critical
system: backend
caution
When defining alerting you must also specify either ticket
and/or page
alerting.
Caution
The Alerting must be defined in the same comment group as where the was defined SLO.
// @sloth.slo name chat-gpt-availability
// @sloth.slo objective 95.0
// @sloth.alerting name ChatGPTAvailability
// @sloth.alerting labels severity critical
// @sloth.alerting labels system backend
// @sloth.alerting annotations tier preemptive
// @sloth.slo description 95% of logins to the chat-gpt app should be successful.
Annotation | Description | Example |
---|---|---|
name | Required. Name is the name used by the alerts generated for this SLO. | @sloth.alerting name ChatGPTAvailability |
labels | Labels are the Prometheus labels that will have all the alerts generated by this SLO. | @sloth.alerting labels severity critical |
annotations | Annotations are the Prometheus annotations that will have all the alerts generated by this SLO. | @sloth.alerting annotations runbook: "https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapilatencyhigh" |
Page Alerting Annotations​
// @sloth.alerting.page labels severity critical
// @sloth.alerting.page tier preemptive
Annotation | Description | Example |
---|---|---|
labels | Labels are the Prometheus labels for the specific alert. For example can be useful to route the Page alert to specific Slack channel. | @sloth.alerting.page labels severity critical |
annotations | Annotations are the Prometheus annotations for the specific alert. | @sloth.alerting.page annotations tier application |
Ticket Alerting Annotations​
// @sloth.alerting.ticket labels severity critical
// @sloth.alerting.ticket annotations tier preemptive
Annotation | Description | Example |
---|---|---|
labels | Labels are the Prometheus labels for the specific alert. For example can be useful to route the Page alert to specific Slack channel. | @sloth.alerting.ticket labels severity critical |
annotations | Annotations are the Prometheus annotations for the specific alert. | @sloth.alerting.ticket annotations tier application |