rpi: вторая копия /mnt/backup на 1 ТБ диск в роутере (rclone SFTP) + мониторинг монтирования и заполнения

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gilfanovr
2026-10-11 15:06:53 +03:00
co-authored by Claude Opus 5.5
parent 3811483577
commit 464e12abdb
7 changed files with 314 additions and 1 deletions
@@ -1096,6 +1096,199 @@
"overrides": []
},
"options": {}
},
{
"type": "row",
"title": "Вторая копия — диск в роутере",
"collapsed": false,
"gridPos": {
"x": 0,
"y": 31,
"w": 24,
"h": 1
},
"id": 200,
"panels": []
},
{
"id": 201,
"type": "stat",
"title": "Диск в роутере (SFTP)",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 32,
"w": 6,
"h": 4
},
"targets": [
{
"refId": "A",
"expr": "router_mount_up{instance=\"$instance\"}",
"instant": true,
"range": false
}
],
"fieldConfig": {
"defaults": {
"mappings": [
{
"type": "value",
"options": {
"1": {
"text": "доступен",
"color": "green"
},
"0": {
"text": "НЕДОСТУПЕН",
"color": "red"
}
}
}
]
},
"overrides": []
},
"description": "rclone-монтирование /mnt/router (Huawei SFTP :8022). Диск питается от роутера, не от малины.",
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "background",
"graphMode": "none",
"textMode": "value",
"justifyMode": "center"
}
},
{
"id": 202,
"type": "stat",
"title": "С последней копии на роутер",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 6,
"y": 32,
"w": 9,
"h": 4
},
"targets": [
{
"refId": "A",
"expr": "time() - backup_last_success_timestamp{instance=\"$instance\",job=\"backup_router\"}",
"instant": true,
"range": false
}
],
"fieldConfig": {
"defaults": {
"unit": "s",
"noValue": "ещё не было",
"thresholds": {
"mode": "absolute",
"steps": [
{
"value": null,
"color": "green"
},
{
"value": 93600,
"color": "orange"
},
{
"value": 108000,
"color": "red"
}
]
}
},
"overrides": []
},
"description": "Ежедневно 06:00: OneDrive (архив — copy, current — зеркало с --max-delete) и зашифрованные бэкапы серверов.",
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "background",
"graphMode": "none",
"textMode": "value",
"justifyMode": "center"
}
},
{
"id": 203,
"type": "stat",
"title": "Заполнение диска в роутере",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 15,
"y": 32,
"w": 9,
"h": 4
},
"targets": [
{
"refId": "A",
"expr": "1 - backup_disk_avail_bytes{instance=\"$instance\",mountpoint=\"/mnt/router\"} / backup_disk_size_bytes{instance=\"$instance\",mountpoint=\"/mnt/router\"}",
"instant": true,
"range": false
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"min": 0,
"max": 1,
"thresholds": {
"mode": "absolute",
"steps": [
{
"value": null,
"color": "green"
},
{
"value": 0.8,
"color": "orange"
},
{
"value": 0.9,
"color": "red"
}
]
}
},
"overrides": []
},
"description": "",
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "background",
"graphMode": "none",
"textMode": "value",
"justifyMode": "center"
}
}
]
}