modules/backup: expose last backup time to monitoring
This commit is contained in:
parent
2205429088
commit
22bf25715e
@ -46,6 +46,8 @@ let
|
|||||||
restic backup ${escapeShellArgs jobOptions.paths}
|
restic backup ${escapeShellArgs jobOptions.paths}
|
||||||
|
|
||||||
restic check
|
restic check
|
||||||
|
|
||||||
|
echo "clerie_backup_last_successful_run_time{backup_job=\"${jobName}\", backup_target=\"${targetName}\"} $(date +%s)" > /var/lib/prometheus-node-exporter/textfiles/clerie-backup-${jobName}-${targetName}.prom
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
) jobTargetPairs);
|
) jobTargetPairs);
|
||||||
|
@ -66,8 +66,15 @@ in
|
|||||||
enabledCollectors = [
|
enabledCollectors = [
|
||||||
"systemd"
|
"systemd"
|
||||||
];
|
];
|
||||||
|
extraFlags = [
|
||||||
|
"--collector.textfile.directory=/var/lib/prometheus-node-exporter/textfiles"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /var/lib/prometheus-node-exporter/textfiles - - - - -"
|
||||||
|
];
|
||||||
|
|
||||||
systemd.services."prometheus-node-exporter".serviceConfig.RestrictAddressFamilies = [ "AF_NETLINK" ];
|
systemd.services."prometheus-node-exporter".serviceConfig.RestrictAddressFamilies = [ "AF_NETLINK" ];
|
||||||
|
|
||||||
services.prometheus.exporters.bird = mkIf cfg.bird {
|
services.prometheus.exporters.bird = mkIf cfg.bird {
|
||||||
|
Loading…
Reference in New Issue
Block a user