fix: use promtool to verify rules, fix format

This commit is contained in:
Ilya K 2024-11-12 23:21:30 +03:00
parent 41be8dc170
commit 54e8282aac
4 changed files with 2 additions and 8 deletions

View file

@ -1,4 +1,3 @@
namespace: forkos
groups:
- name: ForkOS automation
rules:

View file

@ -1,4 +1,3 @@
namespace: postgres
groups:
- name: PostgreSQL
rules:

View file

@ -1,4 +1,3 @@
namespace: resources
groups:
- name: Host & hardware
rules:

View file

@ -12,14 +12,11 @@ let
alerts = pkgs.runCommand "mimir-alerts-checked" {
src = ./alerts;
nativeBuildInputs = with pkgs; [ mimir ];
nativeBuildInputs = with pkgs; [ prometheus.cli ];
} ''
promtool check rules $src/*
mkdir $out
cp -R $src $out/anonymous/
chmod -R +w $out
mimirtool rules check --rule-dirs=$out/anonymous
mimirtool rules lint --rule-dirs=$out/anonymous
diff -r $src $out/anonymous
'';
in
{