mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
service/backup: add alerts when systemd fails
This commit is contained in:
parent
3bf85421fb
commit
32c4c30bdd
1 changed files with 11 additions and 0 deletions
|
@ -161,5 +161,16 @@ in
|
||||||
yearly = 2;
|
yearly = 2;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.services.prometheus.rules = {
|
||||||
|
borgbackup_execution_missing = {
|
||||||
|
condition = ''time() - systemd_timer_last_trigger_seconds{name="borgbackup-job-hetzner.timer"} >= (60 * 60 * (24 + 1))'';
|
||||||
|
description = "{{$labels.instance}}: last backup was 25 hours ago please check.";
|
||||||
|
};
|
||||||
|
borgbackup_last_execution = {
|
||||||
|
condition = ''systemd_unit_state{state="failed", name="borgbackup-job-hetzner.timer"} >= 1'';
|
||||||
|
description = "{{$labels.instance}}: last backup was not successfull please check.";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue