alertmanager
This commit is contained in:
parent
a53076e076
commit
e7d531760d
5 changed files with 146 additions and 3 deletions
|
@ -1,8 +1,23 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
alerts =
|
||||
pkgs.runCommand "mimir-alerts-checked"
|
||||
{
|
||||
src = ./alerts;
|
||||
nativeBuildInputs = with pkgs; [ prometheus.cli ];
|
||||
}
|
||||
''
|
||||
promtool check rules $src/*
|
||||
mkdir $out
|
||||
cp -R $src $out/anonymous/
|
||||
'';
|
||||
in
|
||||
{
|
||||
services.mimir = {
|
||||
enable = true;
|
||||
|
@ -28,6 +43,16 @@
|
|||
max_global_series_per_user = 0; # unlimited
|
||||
max_label_value_length = 10000; # we have pgscv queries that are LONG
|
||||
};
|
||||
|
||||
alertmanager_storage.backend = "filesystem";
|
||||
alertmanager = {
|
||||
sharding_ring.replication_factor = 1;
|
||||
};
|
||||
ruler_storage = {
|
||||
backend = "local";
|
||||
local.directory = alerts;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue