apiVersion: v1 kind: ConfigMap metadata: name: grafana-dashboard-provider namespace: monitoring data: dashboards.yaml: | apiVersion: 1 providers: - name: default orgId: 1 folder: "" type: file disableDeletion: false updateIntervalSeconds: 30 options: path: /var/lib/grafana/dashboards --- apiVersion: v1 kind: ConfigMap metadata: name: grafana-dashboards namespace: monitoring data: k3s-cluster.json: | { "title": "planck k3s cluster", "uid": "planckk3s", "timezone": "browser", "refresh": "15s", "time": { "from": "now-3h", "to": "now" }, "panels": [ { "id": 1, "type": "timeseries", "title": "Pods running by node", "gridPos": {"x": 0, "y": 0, "w": 12, "h": 9}, "targets": [{"expr": "count by (node) (kube_pod_status_phase{phase=\"Running\"} == 1)", "legendFormat": "{{node}}"}], "fieldConfig": {"defaults": {"unit": "short", "min": 0}, "overrides": []} }, { "id": 2, "type": "timeseries", "title": "Deployment replicas: ready vs desired", "gridPos": {"x": 12, "y": 0, "w": 12, "h": 9}, "targets": [ {"expr": "sum by (deployment, namespace) (kube_deployment_status_replicas_ready)", "legendFormat": "ready {{namespace}}/{{deployment}}"}, {"expr": "sum by (deployment, namespace) (kube_deployment_spec_replicas)", "legendFormat": "want {{namespace}}/{{deployment}}"} ], "fieldConfig": {"defaults": {"unit": "short", "min": 0}, "overrides": []} }, { "id": 3, "type": "timeseries", "title": "Top pods by CPU (cores)", "gridPos": {"x": 0, "y": 9, "w": 12, "h": 9}, "targets": [{"expr": "topk(12, sum by (pod, namespace) (rate(container_cpu_usage_seconds_total{container!=\"\", container!=\"POD\"}[2m])))", "legendFormat": "{{namespace}}/{{pod}}"}], "fieldConfig": {"defaults": {"unit": "none"}, "overrides": []} }, { "id": 4, "type": "timeseries", "title": "Top pods by memory (working set)", "gridPos": {"x": 12, "y": 9, "w": 12, "h": 9}, "targets": [{"expr": "topk(12, sum by (pod, namespace) (container_memory_working_set_bytes{container!=\"\", container!=\"POD\"}))", "legendFormat": "{{namespace}}/{{pod}}"}], "fieldConfig": {"defaults": {"unit": "bytes"}, "overrides": []} }, { "id": 5, "type": "timeseries", "title": "Container restarts (cumulative)", "gridPos": {"x": 0, "y": 18, "w": 12, "h": 9}, "targets": [{"expr": "sum by (pod, namespace) (kube_pod_container_status_restarts_total)", "legendFormat": "{{namespace}}/{{pod}}"}], "fieldConfig": {"defaults": {"unit": "short", "min": 0}, "overrides": []} }, { "id": 6, "type": "timeseries", "title": "CPU: requested vs allocatable (per node, top 10 nodes)", "gridPos": {"x": 12, "y": 18, "w": 12, "h": 9}, "targets": [ {"expr": "topk(10, sum by (node) (kube_pod_container_resource_requests{resource=\"cpu\", unit=\"core\"}))", "legendFormat": "requested {{node}}"}, {"expr": "kube_node_status_allocatable{resource=\"cpu\", unit=\"core\"}", "legendFormat": "allocatable {{node}}"} ], "fieldConfig": {"defaults": {"unit": "none"}, "overrides": []} }, { "id": 7, "type": "timeseries", "title": "Nodes Ready", "gridPos": {"x": 0, "y": 27, "w": 12, "h": 7}, "targets": [{"expr": "count(kube_node_status_condition{condition=\"Ready\", status=\"true\"} == 1)", "legendFormat": "nodes ready"}], "fieldConfig": {"defaults": {"unit": "short", "min": 0, "max": 20}, "overrides": []} }, { "id": 8, "type": "timeseries", "title": "Pods not Running (pending/failed/succeeded)", "gridPos": {"x": 12, "y": 27, "w": 12, "h": 7}, "targets": [{"expr": "count by (phase) (kube_pod_status_phase == 1) unless on(pod, namespace, phase) label_replace(kube_pod_status_phase{phase=\"Running\"}, \"phase\", \"running\", \"\", \"\") * 0", "legendFormat": "{{phase}}"}], "fieldConfig": {"defaults": {"unit": "short", "min": 0}, "overrides": []} } ], "schemaVersion": 39, "version": 1 } node-health.json: | { "title": "planck node health", "uid": "plancknodes", "timezone": "browser", "refresh": "10s", "time": { "from": "now-1h", "to": "now" }, "panels": [ { "id": 1, "type": "timeseries", "title": "CPU temperature (all nodes)", "gridPos": {"x": 0, "y": 0, "w": 12, "h": 8}, "targets": [{"expr": "node_thermal_zone_temp", "legendFormat": "{{instance}}"}], "fieldConfig": {"defaults": {"unit": "celsius"}, "overrides": []} }, { "id": 2, "type": "timeseries", "title": "CPU usage % (all nodes)", "gridPos": {"x": 12, "y": 0, "w": 12, "h": 8}, "targets": [{"expr": "100 * (1 - avg by (instance) (rate(node_cpu_seconds_total{mode=\"idle\"}[2m])))", "legendFormat": "{{instance}}"}], "fieldConfig": {"defaults": {"unit": "percent", "min": 0, "max": 100}, "overrides": []} }, { "id": 3, "type": "timeseries", "title": "Memory used % (all nodes)", "gridPos": {"x": 0, "y": 8, "w": 12, "h": 8}, "targets": [{"expr": "100 * (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)", "legendFormat": "{{instance}}"}], "fieldConfig": {"defaults": {"unit": "percent", "min": 0, "max": 100}, "overrides": []} }, { "id": 4, "type": "timeseries", "title": "Disk used % (root, all nodes)", "gridPos": {"x": 12, "y": 8, "w": 12, "h": 8}, "targets": [{"expr": "100 * (1 - node_filesystem_avail_bytes{mountpoint=\"/\"} / node_filesystem_size_bytes{mountpoint=\"/\"})", "legendFormat": "{{instance}}"}], "fieldConfig": {"defaults": {"unit": "percent", "min": 0, "max": 100}, "overrides": []} }, { "id": 5, "type": "timeseries", "title": "Network eth0: RX / TX", "gridPos": {"x": 0, "y": 16, "w": 12, "h": 8}, "targets": [ {"expr": "sum by (instance) (rate(node_network_receive_bytes_total{device=\"eth0\"}[1m]))", "legendFormat": "rx {{instance}}"}, {"expr": "sum by (instance) (rate(node_network_transmit_bytes_total{device=\"eth0\"}[1m]))", "legendFormat": "tx {{instance}}"} ], "fieldConfig": {"defaults": {"unit": "Bps"}, "overrides": []} }, { "id": 6, "type": "timeseries", "title": "SSD I/O: read / write", "gridPos": {"x": 12, "y": 16, "w": 12, "h": 8}, "targets": [ {"expr": "sum by (instance) (rate(node_disk_read_bytes_total{device=~\"sda.*\"}[1m]))", "legendFormat": "read {{instance}}"}, {"expr": "sum by (instance) (rate(node_disk_written_bytes_total{device=~\"sda.*\"}[1m]))", "legendFormat": "write {{instance}}"} ], "fieldConfig": {"defaults": {"unit": "Bps"}, "overrides": []} }, { "id": 7, "type": "timeseries", "title": "Load (1 min, all nodes)", "gridPos": {"x": 0, "y": 24, "w": 24, "h": 7}, "targets": [{"expr": "node_load1", "legendFormat": "{{instance}}"}], "fieldConfig": {"defaults": {"unit": "short"}, "overrides": []} } ], "schemaVersion": 39, "version": 1 } k6-step-load.json: | { "title": "k6 Step Load", "uid": "k6step", "timezone": "browser", "refresh": "5s", "time": { "from": "now-30m", "to": "now" }, "panels": [ { "id": 1, "type": "timeseries", "title": "Request rate (the staircase)", "gridPos": {"x": 0, "y": 0, "w": 24, "h": 8}, "targets": [ {"expr": "sum(rate(k6_http_reqs_total[30s]))", "legendFormat": "total rps"}, {"expr": "sum by (name) (rate(k6_http_reqs_total[30s]))", "legendFormat": "{{name}}"} ], "fieldConfig": {"defaults": {"unit": "reqps"}, "overrides": []} }, { "id": 2, "type": "timeseries", "title": "Latency avg / p50 / p95 / p99", "gridPos": {"x": 0, "y": 8, "w": 12, "h": 8}, "targets": [ {"expr": "k6_http_req_duration_avg", "legendFormat": "avg"}, {"expr": "k6_http_req_duration_p50", "legendFormat": "p50"}, {"expr": "k6_http_req_duration_p95", "legendFormat": "p95"}, {"expr": "k6_http_req_duration_p99", "legendFormat": "p99"} ], "fieldConfig": {"defaults": {"unit": "s"}, "overrides": []} }, { "id": 3, "type": "timeseries", "title": "p95 latency per step", "gridPos": {"x": 12, "y": 8, "w": 12, "h": 8}, "targets": [ {"expr": "k6_http_req_duration_p95", "legendFormat": "{{step}}"} ], "fieldConfig": {"defaults": {"unit": "s"}, "overrides": []} }, { "id": 4, "type": "timeseries", "title": "p95 latency per endpoint", "gridPos": {"x": 0, "y": 16, "w": 12, "h": 8}, "targets": [ {"expr": "k6_http_req_duration_p95", "legendFormat": "{{name}}"} ], "fieldConfig": {"defaults": {"unit": "s"}, "overrides": []} }, { "id": 5, "type": "timeseries", "title": "Error rate", "gridPos": {"x": 12, "y": 16, "w": 12, "h": 8}, "targets": [ {"expr": "sum(rate(k6_http_req_failed_total[30s])) / sum(rate(k6_http_reqs_total[30s]))", "legendFormat": "error fraction"} ], "fieldConfig": {"defaults": {"unit": "percentunit", "min": 0, "max": 1}, "overrides": []} }, { "id": 6, "type": "timeseries", "title": "Active VUs", "gridPos": {"x": 0, "y": 24, "w": 24, "h": 6}, "targets": [{"expr": "k6_vus", "legendFormat": "vus"}], "fieldConfig": {"defaults": {"unit": "short"}, "overrides": []} } ], "schemaVersion": 39, "version": 1 }