Check YAML validity of Alert files at evaluation time #94

Closed
opened 2024-08-09 14:26:33 +00:00 by raito · 2 comments
Owner

At evaluation time, we need to check the YAML validity of the alert definition files, we should not wait for Alertmanager to tell us "sowwy" until we get a proper Nix DSL to write alerts.

YAML is too complicated to be used without a proper annoying checkPhase.

**At evaluation time**, we need to check the YAML validity of the alert definition files, we should not wait for Alertmanager to tell us "sowwy" until we get a proper Nix DSL to write alerts. YAML is too complicated to be used without a proper annoying `checkPhase`.
Owner

Why use yaml in the first place? We could just write the same information as nix expresssion and do buitlins.toJSON in https://git.lix.systems/the-distro/infra/src/branch/main/services/monitoring/lgtm/mimir.nix#L63

I know it's not as good as having a module for the alerts or having something like dns.nix or nixos-dns just for alerts but it'd still be better then importing pure yaml and running a yaml linter over that.

Why use yaml in the first place? We could just write the same information as nix expresssion and do buitlins.toJSON in https://git.lix.systems/the-distro/infra/src/branch/main/services/monitoring/lgtm/mimir.nix#L63 I know it's not as good as having a module for the alerts or having something like dns.nix or nixos-dns just for alerts but it'd still be better then importing pure yaml and running a yaml linter over that.
Author
Owner

@janik I'm fine with this as well, but it doesn't change much there's a checkPhase! :P

@janik I'm fine with this as well, but it doesn't change much there's a `checkPhase`! :P
raito closed this issue 2024-10-10 13:30:00 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: the-distro/infra#94
No description provided.