renge/prometheus: Shorten instance name for nodes

This commit is contained in:
Simon Bruder 2023-12-25 23:37:18 +01:00
parent 0c108d9e44
commit 92bbeffca9
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -71,6 +71,11 @@ in
"shinobu.vpn.sbruder.de:9100"
"nazuna.vpn.sbruder.de:9100"
];
relabel_configs = lib.singleton {
target_label = "instance";
source_labels = lib.singleton "__address__";
regex = "(.*)\\.vpn\\.sbruder\\.de:9100";
};
}
{
job_name = "qbittorrent";
@ -176,7 +181,7 @@ in
rules = map mkAlert [
{
name = "InstanceDown";
expr = ''up{instance!~"(nunotaba|hitagi|mayushii|fuuko).vpn.sbruder.de:.*"} == 0'';
expr = ''up{instance!~"(nunotaba|hitagi|mayushii|fuuko)"} == 0'';
description = "Instance {{ $labels.instance }} of job {{ $labels.job }} has been down for more than 1 minutes.";
}
{