grafana/docs/sources/alerting
Matthew Jacobson 940d18ad57
Alerting: Sanitize invalid label/annotation names for external alertmanagers (#54537)
* Alerting: Sanitize invalid label/annotation names for external alertmanagers

Grafana's built-in Alertmanager supports both Unicode label keys and values; however, if using an external
Prometheus Alertmanager label keys must be compatible with their data model.
This means label keys must only contain ASCII letters, numbers, as well as underscores and match the regex
`[a-zA-Z_][a-zA-Z0-9_]*`.

Any invalid characters will now be removed or replaced by the Grafana alerting engine before being sent to
the external Alertmanager according to the following rules:

- `Whitespace` will be removed.
- `ASCII characters` will be replaced with `_`.
- `All other characters` will be replaced with their lower-case hex representation.

* Prefix hex replacements with `0x`

* Refactor for clarity

* Apply suggestions from code review

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-09-07 11:39:39 -04:00
..
alert-groups Docs: Setup refactor (#49739) 2022-06-02 11:57:22 -05:00
alerting-rules Docs: minor corrections to prefix and naming (#52579) 2022-07-21 12:09:25 +01:00
contact-points Docs: minor corrections to prefix and naming (#52579) 2022-07-21 12:09:25 +01:00
fundamentals Alerting: Sanitize invalid label/annotation names for external alertmanagers (#54537) 2022-09-07 11:39:39 -04:00
high-availability Fixes term Grafana Alerting (#50404) 2022-06-08 13:35:37 +02:00
migrating-alerts Docs: fixes warning for enterprise customers (#52385) 2022-07-18 12:09:29 +02:00
notifications Add redirects for indexed alerting pages (#50918) 2022-06-16 10:32:40 +02:00
silences fix docs with correct instructions to create a silence URL (#52062) 2022-07-12 11:36:01 -04:00
_index.md docs(alerting): removed a repetition of a word (#52376) 2022-07-25 16:38:50 +02:00
alerting-limitations.md Docs: fixes couple of typos (#52031) 2022-07-11 13:04:15 +01:00
difference-old-new.md Fixes term Grafana Alerting (#50404) 2022-06-08 13:35:37 +02:00
images-in-notifications.md Docs: Update docs for images in notifications (#52721) 2022-07-26 10:09:48 +01:00
performance.md Docs: Updates Grafana Alerting upgrade topics (#50533) 2022-06-09 20:12:41 +02:00