diff --git a/.gitignore b/.gitignore index f6a808e..be47843 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ .DS_Store .env -docker/unbound/unbound.conf diff --git a/docker/grafana/provisioning/dashboards/json/homelab-overview.json b/docker/grafana/provisioning/dashboards/json/homelab-overview.json index baf4954..9f0ece7 100644 --- a/docker/grafana/provisioning/dashboards/json/homelab-overview.json +++ b/docker/grafana/provisioning/dashboards/json/homelab-overview.json @@ -41,7 +41,7 @@ }, "overrides": [] }, - "gridPos": { "h": 4, "w": 6, "x": 0, "y": 1 }, + "gridPos": { "h": 4, "w": 4, "x": 0, "y": 1 }, "id": 2, "options": { "colorMode": "value", @@ -89,7 +89,7 @@ }, "overrides": [] }, - "gridPos": { "h": 4, "w": 18, "x": 6, "y": 1 }, + "gridPos": { "h": 4, "w": 14, "x": 10, "y": 1 }, "id": 3, "options": { "colorMode": "background", @@ -114,6 +114,47 @@ "title": "HTTP Endpoints (Blackbox)", "type": "stat" }, + { + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "color": { "mode": "thresholds" }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { "color": "red", "value": null }, + { "color": "green", "value": 3600 } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 6, "x": 4, "y": 1 }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "targets": [ + { + "datasource": "Prometheus", + "expr": "time() - node_boot_time_seconds", + "refId": "A" + } + ], + "title": "Host Uptime", + "type": "stat" + }, { "gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 }, "id": 10, @@ -355,6 +396,54 @@ ], "title": "Container Memory Usage", "type": "timeseries" + }, + { + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 33 }, + "id": 30, + "title": "Container Uptimes", + "type": "row" + }, + { + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "color": { "mode": "thresholds" }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { "color": "red", "value": null }, + { "color": "green", "value": 3600 } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { "h": 6, "w": 24, "x": 0, "y": 34 }, + "id": 31, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "targets": [ + { + "datasource": "Prometheus", + "expr": "time() - max by (container_label_com_docker_compose_service) (container_start_time_seconds{container_label_com_docker_compose_service!=\"\"})", + "legendFormat": "{{container_label_com_docker_compose_service}}", + "refId": "A" + } + ], + "title": "Service Uptimes", + "type": "stat" } ], "refresh": "30s",