Бэкап серверов fr1/ru1 на rpi: сервер шифрует age открытым ключом, малина только хранит

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gilfanovr
2026-10-11 14:44:05 +03:00
co-authored by Claude Opus 5.5
parent e645377916
commit 7d0a891793
11 changed files with 334 additions and 8 deletions
@@ -598,7 +598,7 @@
"gridPos": {
"x": 0,
"y": 10,
"w": 6,
"w": 5,
"h": 4
},
"targets": [
@@ -657,9 +657,9 @@
"uid": "prometheus"
},
"gridPos": {
"x": 6,
"x": 5,
"y": 10,
"w": 6,
"w": 5,
"h": 4
},
"targets": [
@@ -709,6 +709,68 @@
"justifyMode": "center"
}
},
{
"id": 99,
"type": "stat",
"title": "С последнего бэкапа серверов (fr1, ru1)",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 10,
"y": 10,
"w": 5,
"h": 4
},
"targets": [
{
"refId": "A",
"expr": "time() - backup_last_success_timestamp{instance=\"$instance\",job=\"backup_servers\"}",
"legendFormat": "",
"instant": true,
"range": false
}
],
"fieldConfig": {
"defaults": {
"unit": "s",
"noValue": "ещё не было",
"thresholds": {
"mode": "absolute",
"steps": [
{
"value": null,
"color": "green"
},
{
"value": 90000,
"color": "orange"
},
{
"value": 93600,
"color": "red"
}
]
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "background",
"graphMode": "none",
"textMode": "value",
"justifyMode": "center"
},
"description": "Ежедневно 02:15: малина забирает зашифрованные (age) выгрузки fr1 и ru1. Расшифровать на малине нельзя — ключ у владельца."
},
{
"id": 12,
"type": "stat",
@@ -718,9 +780,9 @@
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"x": 15,
"y": 10,
"w": 6,
"w": 5,
"h": 4
},
"targets": [
@@ -786,9 +848,9 @@
"uid": "prometheus"
},
"gridPos": {
"x": 18,
"x": 20,
"y": 10,
"w": 6,
"w": 4,
"h": 4
},
"targets": [
@@ -90,11 +90,12 @@ groups:
annotations:
summary: "{{ $labels.instance }}: {{ $labels.job }} завершился с кодом {{ $value }} — см. journalctl на хосте"
# sync каждые 4ч → 12ч = три пропуска подряд; verify раз в неделю → 8 дней
# sync каждые 4ч → 12ч = три пропуска подряд; verify раз в неделю → 8 дней; бэкап серверов ежедневно → 26ч
- alert: BackupStale
expr: |
(time() - backup_last_success_timestamp{job="backup_onedrive"} > 12 * 3600)
or (time() - backup_last_success_timestamp{job="backup_onedrive_verify"} > 8 * 86400)
or (time() - backup_last_success_timestamp{job="backup_servers"} > 26 * 3600)
for: 10m
labels: {severity: critical}
annotations: