feat: change pushover emergency on alerts

This commit is contained in:
2025-12-01 13:29:37 +01:00
parent 0a30a2ac23
commit 6c046a549e

View File

@@ -103,27 +103,44 @@ in
contactPoints = { contactPoints = {
settings = { settings = {
apiVersion = 1; apiVersion = 1;
contactPoints = [{ contactPoints = [
orgId = 1; {
name = "cp_dominik"; orgId = 1;
receivers = [{ name = "cp_dominik_emergency";
uid = "dominik_pushover_cp_receiver"; receivers = [{
type = "pushover"; uid = "dominik_pushover_emergency";
settings = { type = "pushover";
apiToken = "\${PUSHOVER_API_TOKEN}"; settings = {
userKey = "\${PUSHOVER_USER_KEY}"; apiToken = "\${PUSHOVER_API_TOKEN}";
device = "iphone"; userKey = "\${PUSHOVER_USER_KEY}";
priority = 2; device = "iphone";
retry = "30s"; priority = 2;
expire = "2m"; retry = "30s";
sound = "siren"; expire = "2m";
okSound = "magic"; sound = "siren";
message = '' okSound = "magic";
{{ template "default.message" . }} message = ''{{ template "default.message" . }}'';
''; };
}; }];
}]; }
}]; {
orgId = 1;
name = "cp_dominik_normal";
receivers = [{
uid = "dominik_pushover_normal";
type = "pushover";
settings = {
apiToken = "\${PUSHOVER_API_TOKEN}";
userKey = "\${PUSHOVER_USER_KEY}";
device = "iphone";
priority = 1;
sound = "siren";
okSound = "magic";
message = ''{{ template "default.message" . }}'';
};
}];
}
];
}; };
}; };
@@ -131,7 +148,15 @@ in
settings = { settings = {
apiVersion = 1; apiVersion = 1;
policies = [{ policies = [{
receiver = "cp_dominik"; receiver = "cp_dominik_normal";
repeat_interval = "999d";
routes = [
{
receiver = "cp_dominik_emergency";
matchers = [ "alertname = HostDown" ];
repeat_interval = "999d";
}
];
}]; }];
}; };
}; };