diff --git a/dashboards/Container-Health-(Fleet).json b/dashboards/Container-Health-(Fleet).json new file mode 100644 index 0000000..9246764 --- /dev/null +++ b/dashboards/Container-Health-(Fleet).json @@ -0,0 +1,386 @@ +{ + "id": 2007187001778176, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "thresholds": { + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 1, + "options": {}, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "count(container_health_state{name!=\"\"} == 0) or vector(0)", + "format": "table", + "instant": true, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Unhealthy Container", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "thresholds": { + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 0 + }, + "id": 2, + "options": {}, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "count(changes(container_start_time_seconds{name!=\"\"}[15m]) > 3) or vector(0)", + "format": "table", + "instant": true, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Restart-Loops (15m)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "thresholds": { + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 0 + }, + "id": 3, + "options": {}, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "count(increase(container_oom_events_total{name!=\"\"}[24h]) > 0) or vector(0)", + "format": "table", + "instant": true, + "legendFormat": "", + "refId": "A" + } + ], + "title": "OOM-Kills (24h)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 0 + }, + "id": 4, + "options": {}, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "count(container_last_seen{name!=\"\"})", + "format": "table", + "instant": true, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Container gesamt", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 4 + }, + "id": 5, + "options": {}, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "container_health_state{name!=\"\"} == 0", + "format": "table", + "instant": true, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Unhealthy Container (Details)", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "__name__": true, + "job": true + }, + "renameByName": { + "host": "Host", + "image": "Image", + "name": "Container" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 4 + }, + "id": 6, + "options": {}, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "changes(container_start_time_seconds{name!=\"\"}[1h]) > 0", + "format": "table", + "instant": true, + "legendFormat": "", + "refId": "A" + } + ], + "title": "K\u00fcrzlich neugestartet (1h)", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": false, + "__name__": true, + "job": true + }, + "renameByName": { + "Value": "Restarts/1h", + "host": "Host", + "name": "Container" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 7, + "options": {}, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "count by (host) (container_last_seen{name!=\"\"})", + "format": "time_series", + "instant": false, + "legendFormat": "{{host}}", + "refId": "A" + } + ], + "title": "Container pro Host", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 8, + "options": {}, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "expr": "topk(10, sum by (name, host) (container_memory_working_set_bytes{name!=\"\"}))", + "format": "table", + "instant": true, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Top RAM (working set)", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "__name__": true, + "job": true + }, + "renameByName": { + "Value": "RAM", + "host": "Host", + "name": "Container" + } + } + } + ], + "type": "table" + } + ], + "refresh": "30s", + "schemaVersion": 39, + "tags": [ + "homelab", + "containers", + "cadvisor" + ], + "time": { + "from": "now-6h", + "to": "now" + }, + "timezone": "browser", + "title": "Container Health (Fleet)", + "uid": "container-health-fleet", + "version": 1 +} diff --git a/datasources.json b/datasources.json index 42be9df..c56acc2 100644 --- a/datasources.json +++ b/datasources.json @@ -1,4 +1,24 @@ [ + { + "id": 3, + "uid": "alertmanager", + "orgId": 1, + "name": "Alertmanager", + "type": "alertmanager", + "typeName": "Alertmanager", + "typeLogoUrl": "public/plugins/alertmanager/img/logo.svg", + "access": "proxy", + "url": "http://obs-nuc.nuclide.lan:9093", + "user": "", + "database": "", + "basicAuth": false, + "isDefault": false, + "jsonData": { + "handleGrafanaManagedAlerts": false, + "implementation": "prometheus" + }, + "readOnly": true + }, { "id": 2, "uid": "P8E80F9AEF21F6940",