feat(llm-inference): Phase 7 — Prometheus monitoring + Grafana dashboard
- Phase 7 task file: monitoring.yml
- node_exporter (port 9100) via apt, systemd managed
- nvidia_gpu_exporter v1.2.2 (port 9835) — GPU util, VRAM, temp, power
- Patches kube-prometheus additionalScrapeConfigs secret with 3 new jobs:
node-astro-orbiter, gpu-astro-orbiter, vllm-astro-orbiter
- Deploys Grafana dashboard ConfigMap via kubectl apply
- Grafana dashboard (11 panels):
- Row 1: GPU util %, VRAM used, GPU temp gauge
- Row 2: GPU power draw, vLLM token throughput, request queue depth
- Row 3: vLLM e2e latency p50/p95/p99, KV cache utilization %
- Row 4: System CPU %, memory, root disk gauge
- defaults/main.yml: llm_gpu_exporter_version, llm_gpu_exporter_port
- handlers/main.yml: restart nvidia-gpu-exporter
This commit is contained in:
@@ -0,0 +1,293 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: grafana-llm-inference-dashboard
|
||||
namespace: monitoring
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
data:
|
||||
llm-inference.json: |
|
||||
{
|
||||
"title": "LLM Inference — astro-orbiter",
|
||||
"uid": "llm-astro-orbiter",
|
||||
"timezone": "browser",
|
||||
"refresh": "30s",
|
||||
"schemaVersion": 38,
|
||||
"tags": ["llm", "gpu", "vllm", "astro-orbiter"],
|
||||
"time": { "from": "now-1h", "to": "now" },
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"name": "instance",
|
||||
"type": "constant",
|
||||
"label": "Host",
|
||||
"query": "{{ hostvars['astro-orbiter']['ansible_host'] }}",
|
||||
"hide": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"id": 1,
|
||||
"title": "GPU Utilization %",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "x": 0, "y": 0, "w": 8, "h": 8 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent",
|
||||
"min": 0, "max": 100,
|
||||
"color": { "mode": "palette-classic" },
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "green", "value": null },
|
||||
{ "color": "yellow", "value": 70 },
|
||||
{ "color": "red", "value": 90 }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "nvidia_smi_utilization_gpu_ratio{hostname=\"astro-orbiter\"} * 100",
|
||||
"legendFormat": "GPU Util"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"title": "GPU VRAM Used",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "x": 8, "y": 0, "w": 8, "h": 8 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bytes",
|
||||
"color": { "mode": "palette-classic" }
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "nvidia_smi_memory_used_bytes{hostname=\"astro-orbiter\"}",
|
||||
"legendFormat": "VRAM Used"
|
||||
},
|
||||
{
|
||||
"expr": "nvidia_smi_memory_total_bytes{hostname=\"astro-orbiter\"}",
|
||||
"legendFormat": "VRAM Total"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"title": "GPU Temperature",
|
||||
"type": "gauge",
|
||||
"gridPos": { "x": 16, "y": 0, "w": 8, "h": 8 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "celsius",
|
||||
"min": 0, "max": 100,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "green", "value": null },
|
||||
{ "color": "yellow", "value": 70 },
|
||||
{ "color": "red", "value": 85 }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "nvidia_smi_temperature_gpu{hostname=\"astro-orbiter\"}",
|
||||
"legendFormat": "GPU Temp"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"title": "GPU Power Draw",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "x": 0, "y": 8, "w": 8, "h": 8 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "watt",
|
||||
"color": { "mode": "palette-classic" }
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "nvidia_smi_power_draw_watts{hostname=\"astro-orbiter\"}",
|
||||
"legendFormat": "Power Draw"
|
||||
},
|
||||
{
|
||||
"expr": "nvidia_smi_power_limit_watts{hostname=\"astro-orbiter\"}",
|
||||
"legendFormat": "Power Limit"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"title": "vLLM — Token Throughput",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "x": 8, "y": 8, "w": 8, "h": 8 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "reqps",
|
||||
"color": { "mode": "palette-classic" }
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "rate(vllm:generation_tokens_total{hostname=\"astro-orbiter\"}[1m])",
|
||||
"legendFormat": "Tokens/s (gen)"
|
||||
},
|
||||
{
|
||||
"expr": "rate(vllm:prompt_tokens_total{hostname=\"astro-orbiter\"}[1m])",
|
||||
"legendFormat": "Tokens/s (prompt)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"title": "vLLM — Request Queue Depth",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "x": 16, "y": 8, "w": 8, "h": 8 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short",
|
||||
"color": { "mode": "palette-classic" }
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "vllm:num_requests_running{hostname=\"astro-orbiter\"}",
|
||||
"legendFormat": "Running"
|
||||
},
|
||||
{
|
||||
"expr": "vllm:num_requests_waiting{hostname=\"astro-orbiter\"}",
|
||||
"legendFormat": "Waiting"
|
||||
},
|
||||
{
|
||||
"expr": "vllm:num_requests_swapped{hostname=\"astro-orbiter\"}",
|
||||
"legendFormat": "Swapped"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"title": "vLLM — E2E Request Latency (p50/p95/p99)",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "x": 0, "y": 16, "w": 12, "h": 8 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s",
|
||||
"color": { "mode": "palette-classic" }
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "histogram_quantile(0.50, rate(vllm:e2e_request_latency_seconds_bucket{hostname=\"astro-orbiter\"}[5m]))",
|
||||
"legendFormat": "p50"
|
||||
},
|
||||
{
|
||||
"expr": "histogram_quantile(0.95, rate(vllm:e2e_request_latency_seconds_bucket{hostname=\"astro-orbiter\"}[5m]))",
|
||||
"legendFormat": "p95"
|
||||
},
|
||||
{
|
||||
"expr": "histogram_quantile(0.99, rate(vllm:e2e_request_latency_seconds_bucket{hostname=\"astro-orbiter\"}[5m]))",
|
||||
"legendFormat": "p99"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"title": "vLLM — KV Cache Utilization %",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "x": 12, "y": 16, "w": 12, "h": 8 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent",
|
||||
"min": 0, "max": 100,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "green", "value": null },
|
||||
{ "color": "yellow", "value": 75 },
|
||||
{ "color": "red", "value": 90 }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "vllm:gpu_cache_usage_perc{hostname=\"astro-orbiter\"} * 100",
|
||||
"legendFormat": "KV Cache %"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"title": "System — CPU Usage %",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "x": 0, "y": 24, "w": 8, "h": 7 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent",
|
||||
"min": 0, "max": 100
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "100 - (avg by(instance) (rate(node_cpu_seconds_total{mode=\"idle\",instance=~\"{{ hostvars['astro-orbiter']['ansible_host'] }}:.*\"}[1m])) * 100)",
|
||||
"legendFormat": "CPU Used"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"title": "System — Memory Usage",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "x": 8, "y": 24, "w": 8, "h": 7 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bytes"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "node_memory_MemTotal_bytes{instance=~\"{{ hostvars['astro-orbiter']['ansible_host'] }}:.*\"} - node_memory_MemAvailable_bytes{instance=~\"{{ hostvars['astro-orbiter']['ansible_host'] }}:.*\"}",
|
||||
"legendFormat": "Used"
|
||||
},
|
||||
{
|
||||
"expr": "node_memory_MemTotal_bytes{instance=~\"{{ hostvars['astro-orbiter']['ansible_host'] }}:.*\"}",
|
||||
"legendFormat": "Total"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"title": "System — Disk Usage (root)",
|
||||
"type": "gauge",
|
||||
"gridPos": { "x": 16, "y": 24, "w": 8, "h": 7 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percentunit",
|
||||
"min": 0, "max": 1,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "green", "value": null },
|
||||
{ "color": "yellow", "value": 0.75 },
|
||||
{ "color": "red", "value": 0.90 }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "1 - (node_filesystem_avail_bytes{instance=~\"{{ hostvars['astro-orbiter']['ansible_host'] }}:.*\",mountpoint=\"/\"} / node_filesystem_size_bytes{instance=~\"{{ hostvars['astro-orbiter']['ansible_host'] }}:.*\",mountpoint=\"/\"})",
|
||||
"legendFormat": "Root disk"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user