my-homelab-configs/bootstrap/platform/grafana-dashboards/homelab-overview.json

72 lines
3.6 KiB
JSON

{
"annotations": {"list": []},
"editable": true,
"graphTooltip": 1,
"id": null,
"panels": [
{
"datasource": {"type": "prometheus", "uid": "prometheus"},
"fieldConfig": {"defaults": {"color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}}, "overrides": []},
"gridPos": {"h": 5, "w": 6, "x": 0, "y": 0},
"id": 1,
"options": {"colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "textMode": "auto"},
"targets": [{"expr": "sum(up{job=~\"oci-edge-node|oci-email-node|oci-edge-containers|rpi-node|jeannie-self-heal\"})", "refId": "A"}],
"title": "External Monitoring Targets Up",
"type": "stat"
},
{
"datasource": {"type": "prometheus", "uid": "prometheus"},
"fieldConfig": {"defaults": {"unit": "percent", "min": 0, "max": 100}, "overrides": []},
"gridPos": {"h": 8, "w": 12, "x": 6, "y": 0},
"id": 2,
"targets": [{"expr": "100 - (avg by (instance, job) (rate(node_cpu_seconds_total{job=~\"oci-edge-node|oci-email-node|rpi-node\",mode=\"idle\"}[5m])) * 100)", "legendFormat": "{{job}} {{instance}}", "refId": "A"}],
"title": "VM CPU Utilization",
"type": "timeseries"
},
{
"datasource": {"type": "prometheus", "uid": "prometheus"},
"fieldConfig": {"defaults": {"unit": "bytes", "min": 0}, "overrides": []},
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8},
"id": 3,
"targets": [{"expr": "(1 - node_memory_MemAvailable_bytes{job=~\"oci-edge-node|oci-email-node|rpi-node\"} / node_memory_MemTotal_bytes{job=~\"oci-edge-node|oci-email-node|rpi-node\"}) * node_memory_MemTotal_bytes{job=~\"oci-edge-node|oci-email-node|rpi-node\"}", "legendFormat": "{{job}} {{instance}}", "refId": "A"}],
"title": "VM Memory Used",
"type": "timeseries"
},
{
"datasource": {"type": "prometheus", "uid": "prometheus"},
"fieldConfig": {"defaults": {"unit": "percent", "min": 0, "max": 100}, "overrides": []},
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 8},
"id": 4,
"targets": [{"expr": "100 * (1 - node_filesystem_avail_bytes{job=~\"oci-edge-node|oci-email-node|rpi-node\",fstype!~\"tmpfs|overlay|squashfs\"} / node_filesystem_size_bytes{job=~\"oci-edge-node|oci-email-node|rpi-node\",fstype!~\"tmpfs|overlay|squashfs\"})", "legendFormat": "{{job}} {{instance}} {{mountpoint}}", "refId": "A"}],
"title": "VM Filesystem Used",
"type": "timeseries"
},
{
"datasource": {"type": "prometheus", "uid": "prometheus"},
"fieldConfig": {"defaults": {"unit": "cores", "min": 0}, "overrides": []},
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 16},
"id": 5,
"targets": [{"expr": "sum by (name) (rate(container_cpu_usage_seconds_total{container!=\"\",image!=\"\"}[5m]))", "legendFormat": "{{name}}", "refId": "A"}],
"title": "Kubernetes Container CPU",
"type": "timeseries"
},
{
"datasource": {"type": "prometheus", "uid": "prometheus"},
"fieldConfig": {"defaults": {}, "overrides": []},
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 16},
"id": 6,
"targets": [{"expr": "ALERTS{alertstate=\"firing\"}", "legendFormat": "{{alertname}} {{instance}}", "refId": "A"}],
"title": "Firing Alerts",
"type": "table"
}
],
"refresh": "30s",
"schemaVersion": 39,
"tags": ["homelab", "overview", "oci"],
"templating": {"list": []},
"time": {"from": "now-6h", "to": "now"},
"title": "Homelab Overview",
"uid": "homelab-overview",
"version": 1
}