Files
homelab-gitops/manifests/aerodrome/grafana/grafana.yaml

1951 lines
49 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
meta.helm.sh/release-name: grafana
meta.helm.sh/release-namespace: default
labels:
app.kubernetes.io/instance: grafana
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: grafana
app.kubernetes.io/version: 11.3.1
helm.sh/chart: grafana-8.6.4
name: grafana
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/instance: grafana
app.kubernetes.io/name: grafana
strategy:
type: Recreate
template:
metadata:
annotations:
cattle.io/timestamp: '2025-10-04T04:05:51Z'
checksum/config: f6e2070ec7fff0d4bb82d9a8fabedb9934e42e64a00d72e25402d46520734840
checksum/sc-dashboard-provider-config: e70bf6a851099d385178a76de9757bb0bef8299da6d8443602590e44f05fdf24
checksum/secret: 4eccb44a21c8117c1dbfbfe43f2ac844b240cd2482bc9fba8e4047442d121dc2
kubectl.kubernetes.io/default-container: grafana
kubectl.kubernetes.io/restartedAt: '2026-10-28T17:14:50.583825+00:00'
labels:
app.kubernetes.io/instance: grafana
app.kubernetes.io/name: grafana
app.kubernetes.io/version: 11.3.1
helm.sh/chart: grafana-8.6.4
spec:
automountServiceAccountToken: true
containers:
- env:
- name: POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: GF_SECURITY_ADMIN_USER
valueFrom:
secretKeyRef:
key: admin-user
name: grafana
- name: GF_SECURITY_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
key: admin-password
name: grafana
- name: GF_PATHS_DATA
value: /var/lib/grafana/
- name: GF_PATHS_LOGS
value: /var/log/grafana
- name: GF_PATHS_PLUGINS
value: /var/lib/grafana/plugins
- name: GF_PATHS_PROVISIONING
value: /etc/grafana/provisioning
image: docker.io/grafana/grafana:11.6.16
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 10
httpGet:
path: /api/health
port: 3000
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 30
name: grafana
ports:
- containerPort: 3000
name: grafana
protocol: TCP
- containerPort: 9094
name: gossip-tcp
protocol: TCP
- containerPort: 9094
name: gossip-udp
protocol: UDP
readinessProbe:
failureThreshold: 3
httpGet:
path: /api/health
port: 3000
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources: {}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/grafana/grafana.ini
name: config
subPath: grafana.ini
- mountPath: /var/lib/grafana
name: storage
- mountPath: /etc/grafana/provisioning/datasources/datasources.yaml
name: datasources-config
subPath: datasources.yaml
- mountPath: /etc/grafana/provisioning/dashboards/dashboards.yaml
name: dashboards-provider-config
subPath: dashboards.yaml
- mountPath: /var/lib/grafana-dashboards/ai-stack-dashboard.json
name: ai-stack-dashboard
subPath: ai-stack-dashboard.json
- mountPath: /var/lib/grafana-dashboards/systems-dashboard.json
name: systems-dashboard
subPath: systems-dashboard.json
- mountPath: /var/lib/grafana-dashboards/container-metrics-dashboard.json
name: container-metrics-dashboard
subPath: container-metrics-dashboard.json
dnsPolicy: ClusterFirst
enableServiceLinks: true
initContainers:
- command:
- chown
- -R
- 472:472
- /var/lib/grafana
image: docker.io/library/busybox:1.31.1
imagePullPolicy: IfNotPresent
name: init-chown-data
resources: {}
securityContext:
capabilities:
add:
- CHOWN
runAsNonRoot: false
runAsUser: 0
seccompProfile:
type: RuntimeDefault
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/lib/grafana
name: storage
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
fsGroup: 472
runAsGroup: 472
runAsNonRoot: true
runAsUser: 472
serviceAccount: grafana
serviceAccountName: grafana
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
name: grafana
name: config
- name: storage
persistentVolumeClaim:
claimName: grafana
- configMap:
defaultMode: 420
name: grafana-datasources
name: datasources-config
- configMap:
defaultMode: 420
name: grafana-dashboards-provider
name: dashboards-provider-config
- configMap:
defaultMode: 420
name: grafana-dashboard-ai-stack
name: ai-stack-dashboard
- configMap:
name: grafana-dashboard-systems
name: systems-dashboard
- configMap:
name: grafana-dashboard-containers
name: container-metrics-dashboard
---
apiVersion: v1
kind: Service
metadata:
annotations:
meta.helm.sh/release-name: grafana
meta.helm.sh/release-namespace: default
labels:
app.kubernetes.io/instance: grafana
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: grafana
app.kubernetes.io/version: 11.3.1
helm.sh/chart: grafana-8.6.4
name: grafana
namespace: default
spec:
clusterIP: 10.43.216.183
clusterIPs:
- 10.43.216.183
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: service
port: 8080
protocol: TCP
targetPort: 3000
selector:
app.kubernetes.io/instance: grafana
app.kubernetes.io/name: grafana
sessionAffinity: None
type: ClusterIP
---
apiVersion: v1
kind: Service
metadata:
annotations:
metallb.io/ip-allocated-from-pool: lan-pool
metallb.universe.tf/ip-allocated-from-pool: default-pool
metallb.universe.tf/loadBalancerIP: 140.44.4.32
finalizers:
- service.kubernetes.io/load-balancer-cleanup
labels:
app.kubernetes.io/instance: grafana
app.kubernetes.io/name: grafana
name: grafana-lb
namespace: default
spec:
allocateLoadBalancerNodePorts: true
clusterIP: 10.43.240.82
clusterIPs:
- 10.43.240.82
externalTrafficPolicy: Cluster
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
loadBalancerIP: 140.44.4.32
ports:
- name: grafana-lb
nodePort: 32758
port: 88
protocol: TCP
targetPort: 3000
selector:
app.kubernetes.io/instance: grafana
app.kubernetes.io/name: grafana
sessionAffinity: None
type: LoadBalancer
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app.kubernetes.io/instance: grafana
app.kubernetes.io/name: grafana
name: grafana
namespace: default
spec:
ingressClassName: traefik
rules:
- host: grafana.snarfnet.net
http:
paths:
- backend:
service:
name: grafana-lb
port:
number: 80
path: /
pathType: ImplementationSpecific
tls:
- hosts:
- grafana.snarfnet.net
secretName: firefly-tls-cert
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-datasources
namespace: default
labels:
app.kubernetes.io/name: grafana
data:
datasources.yaml: |
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
jsonData:
timeInterval: 15s
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboards-provider
namespace: default
labels:
app.kubernetes.io/name: grafana
data:
dashboards.yaml: |
apiVersion: 1
providers:
- name: 'ai-stack-provider'
orgId: 1
folder: 'AI Stack & Inference'
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana-dashboards
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboard-ai-stack
namespace: default
labels:
app.kubernetes.io/name: grafana
data:
ai-stack-dashboard.json: |
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 100,
"title": "\u26a1 AI Stack Executive Overview & Cloud Cost Offsets",
"type": "row"
},
{
"id": 1,
"title": "Prompt Tokens Processed (In)",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum(vllm:prompt_tokens_total)",
"legendFormat": "Prompt Tokens",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "blue",
"value": null
}
]
},
"unit": "locale"
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "center"
}
},
{
"id": 2,
"title": "Generation Tokens Synthesized (Out)",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum(vllm:generation_tokens_total)",
"legendFormat": "Gen Tokens",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "locale"
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "center"
}
},
{
"id": 3,
"title": "Homelab Cloud API Savings ($USD)",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "(sum(vllm:prompt_tokens_total) * 0.00000025) + (sum(vllm:generation_tokens_total) * 0.00000100)",
"legendFormat": "Net Savings",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "currencyUSD"
}
},
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "center"
}
},
{
"id": 4,
"title": "Active GPU Cluster Health",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "count(DCGM_FI_DEV_GPU_TEMP)",
"legendFormat": "Tesla T4s Active",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "purple",
"value": null
}
]
},
"unit": "short"
}
},
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "center"
}
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 5
},
"id": 200,
"title": "\ud83c\udfae Tesla T4 GPU Cluster Telemetry (Harvester HCI Spacedock)",
"type": "row"
},
{
"id": 5,
"title": "GPU Core Utilization (%)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 6
},
"datasource": "Prometheus",
"targets": [
{
"expr": "DCGM_FI_DEV_GPU_UTIL",
"legendFormat": "{{Hostname}} ({{modelName}})",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 20
},
"unit": "percent",
"min": 0,
"max": 100
}
}
},
{
"id": 6,
"title": "VRAM Memory Allocated & Used",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 6
},
"datasource": "Prometheus",
"targets": [
{
"expr": "DCGM_FI_DEV_FB_USED * 1024 * 1024",
"legendFormat": "{{Hostname}} VRAM Used",
"refId": "A"
},
{
"expr": "(DCGM_FI_DEV_FB_USED + DCGM_FI_DEV_FB_FREE) * 1024 * 1024",
"legendFormat": "{{Hostname}} VRAM Total",
"refId": "B"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 15
},
"unit": "bytes"
}
}
},
{
"id": 7,
"title": "GPU Thermal Profile (\u00b0C)",
"type": "timeseries",
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 14
},
"datasource": "Prometheus",
"targets": [
{
"expr": "DCGM_FI_DEV_GPU_TEMP",
"legendFormat": "{{Hostname}} (\u00b0C)",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10
},
"unit": "celsius",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 65
},
{
"color": "red",
"value": 80
}
]
}
}
}
},
{
"id": 8,
"title": "GPU Power Draw (Watts)",
"type": "timeseries",
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 14
},
"datasource": "Prometheus",
"targets": [
{
"expr": "DCGM_FI_DEV_POWER_USAGE",
"legendFormat": "{{Hostname}} (Watts)",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 15
},
"unit": "watt"
}
}
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 21
},
"id": 300,
"title": "\ud83e\udde0 vLLM Real-Time Inference Dynamics & Token Velocity",
"type": "row"
},
{
"id": 9,
"title": "Token Generation Velocity (Tokens / Sec)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 22
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum(rate(vllm:generation_tokens_total[2m])) by (model_name)",
"legendFormat": "{{model_name}} (Out)",
"refId": "A"
},
{
"expr": "sum(rate(vllm:prompt_tokens_total[2m])) by (model_name)",
"legendFormat": "{{model_name}} (In)",
"refId": "B"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 25
},
"unit": "cps"
}
}
},
{
"id": 10,
"title": "Inference Concurrency & Request Backlog",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 22
},
"datasource": "Prometheus",
"targets": [
{
"expr": "vllm:num_requests_running",
"legendFormat": "{{model_name}} Running",
"refId": "A"
},
{
"expr": "vllm:num_requests_waiting",
"legendFormat": "{{model_name}} Queued",
"refId": "B"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "stepAfter",
"fillOpacity": 15
},
"unit": "short"
}
}
},
{
"id": 11,
"title": "GPU KV Cache Memory Saturation",
"type": "timeseries",
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 30
},
"datasource": "Prometheus",
"targets": [
{
"expr": "vllm:gpu_cache_usage_factor * 100",
"legendFormat": "{{model_name}} Cache Usage",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 30
},
"unit": "percent",
"min": 0,
"max": 100
}
}
},
{
"id": 12,
"title": "NVIDIA Triton & Qdrant Operations",
"type": "timeseries",
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 30
},
"datasource": "Prometheus",
"targets": [
{
"expr": "rate(nv_inference_request_success[2m])",
"legendFormat": "Triton Success/s",
"refId": "A"
},
{
"expr": "cpu_cores_used",
"legendFormat": "Qdrant CPU Cores",
"refId": "B"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth"
},
"unit": "short"
}
}
}
],
"refresh": "10s",
"schemaVersion": 39,
"tags": [
"ai",
"vllm",
"dcgm",
"gpu",
"snarfnet"
],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m"
]
},
"timezone": "browser",
"title": "SnarfNet AI Stack & Inference Intelligence",
"uid": "snarfnet-ai-stack",
"version": 1
}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboard-systems
namespace: default
labels:
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: grafana
data:
systems-dashboard.json: |-
{
"annotations": {
"list": []
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 100,
"title": "\ud83d\udda5\ufe0f Systems Fleet Overview & Capacity",
"type": "row"
},
{
"id": 1,
"title": "Online Node Exporters",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "count(node_load1)",
"legendFormat": "{{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "center"
}
},
{
"id": 2,
"title": "Avg Cluster CPU Load (1m)",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "avg(node_load1)",
"legendFormat": "{{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "blue",
"value": null
}
]
},
"unit": "none"
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "center"
}
},
{
"id": 3,
"title": "Total Monitored RAM",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum(node_memory_MemTotal_bytes)",
"legendFormat": "{{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "purple",
"value": null
}
]
},
"unit": "bytes"
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "center"
}
},
{
"id": 4,
"title": "Fleet RAM In-Use %",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "(1 - (sum(node_memory_MemAvailable_bytes) / sum(node_memory_MemTotal_bytes))) * 100",
"legendFormat": "{{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "orange",
"value": null
}
]
},
"unit": "percent"
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "center"
}
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 5
},
"id": 200,
"title": "\u26a1 CPU Load & Core Utilization",
"type": "row"
},
{
"id": 5,
"title": "CPU Utilization by Host (%)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 6
},
"datasource": "Prometheus",
"targets": [
{
"expr": "100 - (avg by (instance, cluster) (rate(node_cpu_seconds_total{mode='idle'}[2m])) * 100)",
"legendFormat": "{{cluster}} - {{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "percent"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 6,
"title": "1-Minute Load Average by Host",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 6
},
"datasource": "Prometheus",
"targets": [
{
"expr": "node_load1",
"legendFormat": "{{cluster}} - {{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "none"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 14
},
"id": 300,
"title": "\ud83e\udde0 Memory Consumption & Free Capacity",
"type": "row"
},
{
"id": 7,
"title": "Memory Used % by Host",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 15
},
"datasource": "Prometheus",
"targets": [
{
"expr": "(1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100",
"legendFormat": "{{cluster}} - {{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "percent"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 8,
"title": "Available RAM by Host (GiB)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 15
},
"datasource": "Prometheus",
"targets": [
{
"expr": "node_memory_MemAvailable_bytes",
"legendFormat": "{{cluster}} - {{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "bytes"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 23
},
"id": 400,
"title": "\ud83d\udcbe Filesystem & Disk I/O Performance",
"type": "row"
},
{
"id": 9,
"title": "Root (/) Filesystem Usage %",
"type": "bargauge",
"gridPos": {
"h": 8,
"w": 8,
"x": 0,
"y": 24
},
"datasource": "Prometheus",
"targets": [
{
"expr": "(1 - (node_filesystem_avail_bytes{mountpoint='/'} / node_filesystem_size_bytes{mountpoint='/'})) * 100",
"legendFormat": "{{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 75
},
{
"color": "red",
"value": 90
}
]
},
"unit": "percent",
"min": 0,
"max": 100
}
},
"options": {
"displayMode": "gradient",
"orientation": "horizontal",
"showUnfilled": true
}
},
{
"id": 10,
"title": "Disk Read Throughput (Bytes/sec)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 8,
"x": 8,
"y": 24
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum by (instance) (rate(node_disk_read_bytes_total[2m]))",
"legendFormat": "Read {{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "Bps"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 11,
"title": "Disk Write Throughput (Bytes/sec)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 8,
"x": 16,
"y": 24
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum by (instance) (rate(node_disk_written_bytes_total[2m]))",
"legendFormat": "Write {{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "Bps"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 32
},
"id": 500,
"title": "\ud83c\udf10 Network Throughput (RX / TX)",
"type": "row"
},
{
"id": 12,
"title": "Host Network Receive (RX)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 33
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum by (instance) (rate(node_network_receive_bytes_total{device!~'lo|veth.*|flannel.*|cali.*'}[2m]))",
"legendFormat": "RX {{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "Bps"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 13,
"title": "Host Network Transmit (TX)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 33
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum by (instance) (rate(node_network_transmit_bytes_total{device!~'lo|veth.*|flannel.*|cali.*'}[2m]))",
"legendFormat": "TX {{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "Bps"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
}
],
"refresh": "10s",
"schemaVersion": 39,
"tags": [
"infrastructure",
"systems",
"snarfnet",
"node-exporter"
],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "\ud83d\udda5\ufe0f Systems & Cluster Host Performance",
"uid": "snarfnet-systems"
}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboard-containers
namespace: default
labels:
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: grafana
data:
container-metrics-dashboard.json: |-
{
"annotations": {
"list": []
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 100,
"title": "\ud83d\udce6 Container Fleet & Pod Metrics",
"type": "row"
},
{
"id": 1,
"title": "Monitored Containers",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "count(container_last_seen{container!=''})",
"legendFormat": "{{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "center"
}
},
{
"id": 2,
"title": "Active Kubernetes Pods",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "count(count by (pod, namespace) (container_last_seen{container!=''}))",
"legendFormat": "{{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "blue",
"value": null
}
]
},
"unit": "none"
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "center"
}
},
{
"id": 3,
"title": "Total Container CPU Load",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum(rate(container_cpu_usage_seconds_total{container!=''}[2m]))",
"legendFormat": "{{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "purple",
"value": null
}
]
},
"unit": "none"
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "center"
}
},
{
"id": 4,
"title": "Total Container RAM",
"type": "stat",
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 1
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum(container_memory_working_set_bytes{container!=''})",
"legendFormat": "{{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "orange",
"value": null
}
]
},
"unit": "bytes"
}
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "center"
}
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 5
},
"id": 200,
"title": "\u26a1 Top Container CPU Utilization",
"type": "row"
},
{
"id": 5,
"title": "Top 10 CPU Consuming Pods (Cores)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 6
},
"datasource": "Prometheus",
"targets": [
{
"expr": "topk(10, sum by (pod, namespace) (rate(container_cpu_usage_seconds_total{container!=''}[2m])))",
"legendFormat": "{{namespace}} / {{pod}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "none"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 6,
"title": "CPU Throttling by Namespace",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 6
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum by (namespace) (rate(container_cpu_cfs_throttled_periods_total[2m]))",
"legendFormat": "{{namespace}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "none"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 14
},
"id": 300,
"title": "\ud83e\udde0 Container Memory Working Set",
"type": "row"
},
{
"id": 7,
"title": "Top 10 Memory Consuming Pods",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 14,
"x": 0,
"y": 15
},
"datasource": "Prometheus",
"targets": [
{
"expr": "topk(10, sum by (pod, namespace) (container_memory_working_set_bytes{container!=''}))",
"legendFormat": "{{namespace}} / {{pod}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "bytes"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 8,
"title": "Memory by Namespace",
"type": "bargauge",
"gridPos": {
"h": 8,
"w": 10,
"x": 14,
"y": 15
},
"datasource": "Prometheus",
"targets": [
{
"expr": "sum by (namespace) (container_memory_working_set_bytes{container!=''})",
"legendFormat": "{{instance}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 75
},
{
"color": "red",
"value": 90
}
]
},
"unit": "bytes",
"min": 0,
"max": 100
}
},
"options": {
"displayMode": "gradient",
"orientation": "horizontal",
"showUnfilled": true
}
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 23
},
"id": 400,
"title": "\ud83c\udf10 Container Network Traffic",
"type": "row"
},
{
"id": 9,
"title": "Top Pod Network RX (Receive)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 24
},
"datasource": "Prometheus",
"targets": [
{
"expr": "topk(10, sum by (pod, namespace) (rate(container_network_receive_bytes_total[2m])))",
"legendFormat": "RX {{namespace}}/{{pod}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "Bps"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 10,
"title": "Top Pod Network TX (Transmit)",
"type": "timeseries",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"datasource": "Prometheus",
"targets": [
{
"expr": "topk(10, sum by (pod, namespace) (rate(container_network_transmit_bytes_total[2m])))",
"legendFormat": "TX {{namespace}}/{{pod}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 2,
"fillOpacity": 15
},
"unit": "Bps"
}
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
}
],
"refresh": "10s",
"schemaVersion": 39,
"tags": [
"kubernetes",
"containers",
"cadvisor",
"snarfnet",
"workloads"
],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "\ud83d\udce6 Kubernetes Containers & Workloads",
"uid": "snarfnet-containers"
}