feat(infra): redesign Grafana dashboards, consolidate to single Prometheus

Replace 11 overlapping legacy dashboards with 5 focused dashboards:
- Operations Cockpit (services, Argo CI/CD, resources, auth)
- Trading & ML Intelligence (signals, execution, risk, gRPC)
- Training & CI/CD (training curves, GPU, hyperopt, Argo pipelines)
- Infrastructure & Cluster (nodes, pods, storage, network)
- Observability & API Gateway (logs/Loki, traces/Tempo, API metrics)

Remove gitlab-prometheus-server dependency — single Prometheus instance
with all scrape configs including Argo Workflows (HTTPS + skip verify).
Update Grafana datasource and import.sh for new dashboard structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-05 16:50:52 +01:00
parent d3a3403053
commit 26d2ac7a5c
17 changed files with 4768 additions and 14553 deletions

View File

@@ -42,7 +42,7 @@ datasources:
datasources:
- name: Prometheus
type: prometheus
url: http://gitlab-prometheus-server.foxhunt.svc.cluster.local:80
url: http://prometheus.foxhunt.svc.cluster.local:80
access: proxy
isDefault: true
- name: Loki

View File

@@ -1,695 +0,0 @@
{
"__inputs": [
{ "name": "DS_PROMETHEUS", "label": "Prometheus", "description": "", "type": "datasource", "pluginId": "prometheus" }
],
"id": null,
"uid": "foxhunt-cluster-overview",
"title": "K8s Cluster Overview",
"description": "Kubernetes cluster health: nodes, pods, CPU, memory, disk, and network",
"tags": ["kubernetes", "foxhunt", "cluster"],
"timezone": "browser",
"schemaVersion": 39,
"version": 1,
"refresh": "30s",
"time": {
"from": "now-1h",
"to": "now"
},
"fiscalYearStartMonth": 0,
"liveNow": false,
"weekStart": "",
"templating": {
"list": [
{
"name": "namespace",
"type": "query",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"query": "label_values(kube_pod_info, namespace)",
"refresh": 2,
"includeAll": true,
"multi": true,
"allValue": ".*",
"current": {
"selected": true,
"text": "All",
"value": "$__all"
},
"sort": 1
},
{
"name": "node",
"type": "query",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"query": "label_values(node_uname_info, nodename)",
"refresh": 2,
"includeAll": true,
"multi": true,
"allValue": ".*",
"current": {
"selected": true,
"text": "All",
"value": "$__all"
},
"sort": 1
}
]
},
"panels": [
{
"id": 1,
"type": "row",
"title": "Cluster Summary",
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
"collapsed": false,
"panels": []
},
{
"id": 2,
"type": "stat",
"title": "Total Nodes",
"gridPos": { "h": 4, "w": 4, "x": 0, "y": 1 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "red", "value": null },
{ "color": "green", "value": 1 }
]
},
"mappings": [],
"color": { "mode": "thresholds" }
},
"overrides": []
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
"orientation": "auto",
"textMode": "auto",
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto"
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "count(kube_node_info)",
"legendFormat": "Nodes",
"instant": true
}
]
},
{
"id": 3,
"type": "stat",
"title": "Pods Running",
"gridPos": { "h": 4, "w": 4, "x": 4, "y": 1 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null }
]
},
"mappings": [],
"color": { "mode": "thresholds" }
},
"overrides": []
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
"orientation": "auto",
"textMode": "auto",
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto"
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum(kube_pod_status_phase{namespace=~\"$namespace\", phase=\"Running\"})",
"legendFormat": "Running",
"instant": true
}
]
},
{
"id": 4,
"type": "stat",
"title": "Pods Pending",
"gridPos": { "h": 4, "w": 4, "x": 8, "y": 1 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 1 },
{ "color": "red", "value": 5 }
]
},
"mappings": [],
"color": { "mode": "thresholds" }
},
"overrides": []
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
"orientation": "auto",
"textMode": "auto",
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto"
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum(kube_pod_status_phase{namespace=~\"$namespace\", phase=\"Pending\"}) or vector(0)",
"legendFormat": "Pending",
"instant": true
}
]
},
{
"id": 5,
"type": "stat",
"title": "Pods Failed",
"gridPos": { "h": 4, "w": 4, "x": 12, "y": 1 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "red", "value": 1 }
]
},
"mappings": [],
"color": { "mode": "thresholds" }
},
"overrides": []
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
"orientation": "auto",
"textMode": "auto",
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto"
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum(kube_pod_status_phase{namespace=~\"$namespace\", phase=\"Failed\"}) or vector(0)",
"legendFormat": "Failed",
"instant": true
}
]
},
{
"id": 6,
"type": "gauge",
"title": "Cluster CPU Usage %",
"gridPos": { "h": 4, "w": 4, "x": 16, "y": 1 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 70 },
{ "color": "red", "value": 90 }
]
},
"min": 0,
"max": 100,
"unit": "percent",
"mappings": [],
"color": { "mode": "thresholds" }
},
"overrides": []
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
"showThresholdLabels": false,
"showThresholdMarkers": true,
"orientation": "auto"
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "100 - (avg(rate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)",
"legendFormat": "CPU %",
"instant": true
}
]
},
{
"id": 7,
"type": "gauge",
"title": "Cluster Memory Usage %",
"gridPos": { "h": 4, "w": 4, "x": 20, "y": 1 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 70 },
{ "color": "red", "value": 90 }
]
},
"min": 0,
"max": 100,
"unit": "percent",
"mappings": [],
"color": { "mode": "thresholds" }
},
"overrides": []
},
"options": {
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
"showThresholdLabels": false,
"showThresholdMarkers": true,
"orientation": "auto"
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "(1 - (sum(node_memory_MemAvailable_bytes) / sum(node_memory_MemTotal_bytes))) * 100",
"legendFormat": "Memory %",
"instant": true
}
]
},
{
"id": 10,
"type": "row",
"title": "CPU",
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 },
"collapsed": false,
"panels": []
},
{
"id": 11,
"type": "timeseries",
"title": "Per-Node CPU Usage",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "scheme",
"spanNulls": false,
"showPoints": "never",
"stacking": { "mode": "none", "group": "A" },
"axisPlacement": "auto",
"lineWidth": 1
},
"unit": "percentunit",
"min": 0,
"max": 1,
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] },
"color": { "mode": "palette-classic" },
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": { "mode": "multi", "sort": "desc" },
"legend": { "displayMode": "table", "placement": "bottom", "calcs": ["mean", "max"] }
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "1 - avg by (instance) (rate(node_cpu_seconds_total{mode=\"idle\"}[5m]))",
"legendFormat": "{{ instance }}"
}
]
},
{
"id": 12,
"type": "timeseries",
"title": "CPU Requests vs Limits vs Usage",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 6 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "none",
"spanNulls": false,
"showPoints": "never",
"stacking": { "mode": "none", "group": "A" },
"axisPlacement": "auto",
"lineWidth": 1
},
"unit": "short",
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] },
"color": { "mode": "palette-classic" },
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": { "mode": "multi", "sort": "desc" },
"legend": { "displayMode": "table", "placement": "bottom", "calcs": ["mean", "max"] }
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum(kube_pod_container_resource_requests{namespace=~\"$namespace\", resource=\"cpu\"})",
"legendFormat": "Requests"
},
{
"refId": "B",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum(kube_pod_container_resource_limits{namespace=~\"$namespace\", resource=\"cpu\"})",
"legendFormat": "Limits"
},
{
"refId": "C",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\", image!=\"\"}[5m]))",
"legendFormat": "Usage"
}
]
},
{
"id": 20,
"type": "row",
"title": "Memory",
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 },
"collapsed": false,
"panels": []
},
{
"id": 21,
"type": "timeseries",
"title": "Per-Node Memory Usage",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 15 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "scheme",
"spanNulls": false,
"showPoints": "never",
"stacking": { "mode": "none", "group": "A" },
"axisPlacement": "auto",
"lineWidth": 1
},
"unit": "bytes",
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] },
"color": { "mode": "palette-classic" },
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": { "mode": "multi", "sort": "desc" },
"legend": { "displayMode": "table", "placement": "bottom", "calcs": ["mean", "max"] }
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes",
"legendFormat": "{{ instance }}"
}
]
},
{
"id": 22,
"type": "timeseries",
"title": "Memory Requests vs Limits vs Usage",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 15 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "none",
"spanNulls": false,
"showPoints": "never",
"stacking": { "mode": "none", "group": "A" },
"axisPlacement": "auto",
"lineWidth": 1
},
"unit": "bytes",
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] },
"color": { "mode": "palette-classic" },
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": { "mode": "multi", "sort": "desc" },
"legend": { "displayMode": "table", "placement": "bottom", "calcs": ["mean", "max"] }
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum(kube_pod_container_resource_requests{namespace=~\"$namespace\", resource=\"memory\"})",
"legendFormat": "Requests"
},
{
"refId": "B",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum(kube_pod_container_resource_limits{namespace=~\"$namespace\", resource=\"memory\"})",
"legendFormat": "Limits"
},
{
"refId": "C",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum(container_memory_working_set_bytes{namespace=~\"$namespace\", image!=\"\"})",
"legendFormat": "Usage"
}
]
},
{
"id": 30,
"type": "row",
"title": "Disk",
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 23 },
"collapsed": false,
"panels": []
},
{
"id": 31,
"type": "timeseries",
"title": "Node Filesystem Usage",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 24 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "scheme",
"spanNulls": false,
"showPoints": "never",
"stacking": { "mode": "none", "group": "A" },
"axisPlacement": "auto",
"lineWidth": 1
},
"unit": "percentunit",
"min": 0,
"max": 1,
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] },
"color": { "mode": "palette-classic" },
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": { "mode": "multi", "sort": "desc" },
"legend": { "displayMode": "table", "placement": "bottom", "calcs": ["mean", "max"] }
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "1 - (node_filesystem_avail_bytes{mountpoint=\"/\", fstype!=\"tmpfs\"} / node_filesystem_size_bytes{mountpoint=\"/\", fstype!=\"tmpfs\"})",
"legendFormat": "{{ instance }}"
}
]
},
{
"id": 32,
"type": "timeseries",
"title": "Disk I/O Throughput",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 24 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "none",
"spanNulls": false,
"showPoints": "never",
"stacking": { "mode": "none", "group": "A" },
"axisPlacement": "auto",
"lineWidth": 1
},
"unit": "Bps",
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] },
"color": { "mode": "palette-classic" },
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": { "mode": "multi", "sort": "desc" },
"legend": { "displayMode": "table", "placement": "bottom", "calcs": ["mean", "max"] }
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum by (instance) (rate(node_disk_read_bytes_total[5m]))",
"legendFormat": "{{ instance }} read"
},
{
"refId": "B",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum by (instance) (rate(node_disk_written_bytes_total[5m]))",
"legendFormat": "{{ instance }} write"
}
]
},
{
"id": 40,
"type": "row",
"title": "Network",
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 32 },
"collapsed": false,
"panels": []
},
{
"id": 41,
"type": "timeseries",
"title": "Node Network Receive / Transmit",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 33 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "none",
"spanNulls": false,
"showPoints": "never",
"stacking": { "mode": "none", "group": "A" },
"axisPlacement": "auto",
"lineWidth": 1
},
"unit": "Bps",
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] },
"color": { "mode": "palette-classic" },
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": { "mode": "multi", "sort": "desc" },
"legend": { "displayMode": "table", "placement": "bottom", "calcs": ["mean", "max"] }
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum by (instance) (rate(node_network_receive_bytes_total{device!~\"lo|veth.*|docker.*|flannel.*|cali.*|cbr.*\"}[5m]))",
"legendFormat": "{{ instance }} rx"
},
{
"refId": "B",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum by (instance) (rate(node_network_transmit_bytes_total{device!~\"lo|veth.*|docker.*|flannel.*|cali.*|cbr.*\"}[5m]))",
"legendFormat": "{{ instance }} tx"
}
]
},
{
"id": 42,
"type": "timeseries",
"title": "Pod Network I/O",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 33 },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "none",
"spanNulls": false,
"showPoints": "never",
"stacking": { "mode": "normal", "group": "A" },
"axisPlacement": "auto",
"lineWidth": 1
},
"unit": "Bps",
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] },
"color": { "mode": "palette-classic" },
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": { "mode": "multi", "sort": "desc" },
"legend": { "displayMode": "table", "placement": "bottom", "calcs": ["mean", "max"] }
},
"targets": [
{
"refId": "A",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum by (namespace) (rate(container_network_receive_bytes_total{namespace=~\"$namespace\", image!=\"\"}[5m]))",
"legendFormat": "{{ namespace }} rx"
},
{
"refId": "B",
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"expr": "sum by (namespace) (rate(container_network_transmit_bytes_total{namespace=~\"$namespace\", image!=\"\"}[5m]))",
"legendFormat": "{{ namespace }} tx"
}
]
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,717 +0,0 @@
{
"__inputs": [
{
"name": "DS_LOKI",
"label": "Loki",
"description": "",
"type": "datasource",
"pluginId": "loki"
},
{
"name": "DS_TEMPO",
"label": "Tempo",
"description": "",
"type": "datasource",
"pluginId": "tempo"
}
],
"id": null,
"uid": "foxhunt-logs",
"title": "Log Explorer",
"description": "Log volume, error rates, top errors, live log stream, trace search",
"tags": [
"foxhunt",
"production"
],
"timezone": "browser",
"schemaVersion": 39,
"version": 1,
"editable": true,
"refresh": "30s",
"time": {
"from": "now-1h",
"to": "now"
},
"fiscalYearStartMonth": 0,
"liveNow": false,
"weekStart": "",
"templating": {
"list": [
{
"name": "service",
"type": "custom",
"query": "api,trading-service,ml-training-service,backtesting-service,trading-agent-service,broker-gateway,data-acquisition-service",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"multi": true,
"includeAll": true,
"allValue": ".*",
"sort": 0
},
{
"name": "search",
"type": "textbox",
"query": "",
"current": {
"selected": false,
"text": "",
"value": ""
},
"label": "Log Search"
},
{
"name": "interval",
"type": "interval",
"query": "1m,5m,15m,30m,1h",
"current": {
"selected": true,
"text": "5m",
"value": "5m"
},
"auto": false
}
]
},
"panels": [
{
"id": 1,
"type": "row",
"title": "Log Volume Overview",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"collapsed": false,
"panels": []
},
{
"id": 2,
"type": "timeseries",
"title": "Log Volume by Service",
"gridPos": {
"h": 8,
"w": 16,
"x": 0,
"y": 1
},
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "bars",
"lineInterpolation": "linear",
"fillOpacity": 60,
"gradientMode": "none",
"spanNulls": false,
"showPoints": "never",
"stacking": {
"mode": "normal",
"group": "A"
},
"axisPlacement": "auto",
"lineWidth": 0
},
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"color": {
"mode": "palette-classic"
},
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"sum",
"mean"
]
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"expr": "sum by (app) (count_over_time({namespace=\"foxhunt\", app=~\"$service\"} [$interval]))",
"legendFormat": "{{ app }}"
}
]
},
{
"id": 3,
"type": "stat",
"title": "Total Logs (1h)",
"gridPos": {
"h": 4,
"w": 4,
"x": 16,
"y": 1
},
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "blue",
"value": null
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"orientation": "auto",
"textMode": "auto",
"colorMode": "background",
"graphMode": "none",
"justifyMode": "center"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"expr": "sum(count_over_time({namespace=\"foxhunt\", app=~\"$service\"} [1h]))",
"instant": true
}
]
},
{
"id": 4,
"type": "stat",
"title": "Errors (1h)",
"gridPos": {
"h": 4,
"w": 4,
"x": 20,
"y": 1
},
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 10
},
{
"color": "red",
"value": 50
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"orientation": "auto",
"textMode": "auto",
"colorMode": "background",
"graphMode": "area",
"justifyMode": "center"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"expr": "sum(count_over_time({namespace=\"foxhunt\", app=~\"$service\", container!~\"loki|grafana|grafana-sc-dashboard|prometheus-server\"} |= \"ERROR\" [1h]))",
"instant": true
}
]
},
{
"id": 5,
"type": "stat",
"title": "Warnings (1h)",
"gridPos": {
"h": 4,
"w": 4,
"x": 16,
"y": 5
},
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 50
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"orientation": "auto",
"textMode": "auto",
"colorMode": "background",
"graphMode": "none",
"justifyMode": "center"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"expr": "sum(count_over_time({namespace=\"foxhunt\", app=~\"$service\"} |= \"WARN\" [1h]))",
"instant": true
}
]
},
{
"id": 6,
"type": "stat",
"title": "Error Rate /min",
"gridPos": {
"h": 4,
"w": 4,
"x": 20,
"y": 5
},
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 1
},
{
"color": "red",
"value": 5
}
]
},
"unit": "short",
"decimals": 1,
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"orientation": "auto",
"textMode": "auto",
"colorMode": "background",
"graphMode": "area",
"justifyMode": "center"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"expr": "sum(count_over_time({namespace=\"foxhunt\", app=~\"$service\", container!~\"loki|grafana|grafana-sc-dashboard|prometheus-server\"} |= \"ERROR\" [1m]))",
"instant": true
}
]
},
{
"id": 10,
"type": "row",
"title": "Error Analysis",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 9
},
"collapsed": false,
"panels": []
},
{
"id": 11,
"type": "timeseries",
"title": "Error Rate by Service",
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 10
},
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 20,
"gradientMode": "scheme",
"spanNulls": false,
"showPoints": "never",
"stacking": {
"mode": "none",
"group": "A"
},
"axisPlacement": "auto",
"lineWidth": 2
},
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"color": {
"mode": "palette-classic"
},
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "right",
"calcs": [
"sum",
"max",
"last"
]
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"expr": "sum by (app) (count_over_time({namespace=\"foxhunt\", app=~\"$service\", container!~\"loki|grafana|grafana-sc-dashboard|prometheus-server\"} |= \"ERROR\" [$interval]))",
"legendFormat": "{{ app }}"
}
]
},
{
"id": 12,
"type": "table",
"title": "Top Error Messages",
"description": "Most frequent error messages across all services in the time range",
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 17
},
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"showHeader": true,
"sortBy": [
{
"displayName": "Value",
"desc": true
}
],
"footer": {
"show": false
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"expr": "topk(20, sum by (app, level) (count_over_time({namespace=\"foxhunt\", app=~\"$service\", container!~\"loki|grafana|grafana-sc-dashboard|prometheus-server\"} |= \"ERROR\" | logfmt [$interval])))",
"legendFormat": "{{ app }}",
"instant": true
}
]
},
{
"id": 20,
"type": "row",
"title": "Live Logs",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 25
},
"collapsed": false,
"panels": []
},
{
"id": 21,
"type": "logs",
"title": "Live Log Stream",
"description": "Streaming logs from selected services. Use the $search variable to filter.",
"gridPos": {
"h": 14,
"w": 24,
"x": 0,
"y": 26
},
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"options": {
"showTime": true,
"showLabels": true,
"showCommonLabels": false,
"wrapLogMessage": true,
"prettifyLogMessage": false,
"enableLogDetails": true,
"sortOrder": "Descending",
"dedupStrategy": "none"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "loki",
"uid": "${DS_LOKI}"
},
"expr": "{namespace=\"foxhunt\", app=~\"$service\"} |= \"$search\"",
"maxLines": 500
}
]
},
{
"id": 30,
"type": "row",
"title": "Traces",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 40
},
"collapsed": false,
"panels": []
},
{
"id": 31,
"type": "table",
"title": "Recent Traces",
"description": "Search for distributed traces via Tempo. Click a trace ID to view the full trace.",
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 41
},
"datasource": {
"type": "tempo",
"uid": "${DS_TEMPO}"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
},
"links": [
{
"title": "View Trace",
"url": "",
"internal": {
"datasourceUid": "${DS_TEMPO}",
"datasourceName": "Tempo",
"query": {
"queryType": "traceql",
"query": "${__data.fields.traceID}"
}
}
}
]
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Duration"
},
"properties": [
{
"id": "unit",
"value": "ns"
}
]
}
]
},
"options": {
"showHeader": true,
"sortBy": [
{
"displayName": "Start time",
"desc": true
}
],
"footer": {
"show": false
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "tempo",
"uid": "${DS_TEMPO}"
},
"queryType": "nativeSearch",
"serviceName": "",
"spanName": "",
"search": "",
"minDuration": "",
"maxDuration": "",
"limit": 20
}
]
}
]
}

View File

@@ -0,0 +1,767 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"type": "datasource",
"pluginId": "prometheus"
},
{
"name": "DS_LOKI",
"label": "Loki",
"type": "datasource",
"pluginId": "loki"
},
{
"name": "DS_TEMPO",
"label": "Tempo",
"type": "datasource",
"pluginId": "tempo"
}
],
"annotations": {
"list": []
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": null,
"links": [],
"panels": [
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
"id": 100,
"title": "API Gateway Overview",
"type": "row"
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null }
]
},
"unit": "reqps"
},
"overrides": []
},
"gridPos": { "h": 4, "w": 4, "x": 0, "y": 1 },
"id": 1,
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"colorMode": "background",
"graphMode": "none"
},
"title": "Total Request Rate",
"type": "stat",
"targets": [
{
"expr": "sum(rate(api_gateway_http_requests_total[$interval]))",
"legendFormat": "",
"refId": "A"
}
]
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 1 },
{ "color": "red", "value": 5 }
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": { "h": 4, "w": 4, "x": 4, "y": 1 },
"id": 2,
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"colorMode": "background",
"graphMode": "none"
},
"title": "Error Rate %",
"type": "stat",
"targets": [
{
"expr": "sum(rate(api_gateway_http_requests_total{status=~\"5..\"}[$interval])) / sum(rate(api_gateway_http_requests_total[$interval])) * 100",
"legendFormat": "",
"refId": "A"
}
]
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "yellow", "value": 0.5 },
{ "color": "red", "value": 1 }
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": { "h": 4, "w": 4, "x": 8, "y": 1 },
"id": 3,
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"colorMode": "background",
"graphMode": "none"
},
"title": "P99 Latency",
"type": "stat",
"targets": [
{
"expr": "histogram_quantile(0.99, sum(rate(api_gateway_request_duration_seconds_bucket[$interval])) by (le))",
"legendFormat": "",
"refId": "A"
}
]
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "blue", "value": null }
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": { "h": 4, "w": 4, "x": 12, "y": 1 },
"id": 4,
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"colorMode": "background",
"graphMode": "none"
},
"title": "Active WebSockets",
"type": "stat",
"targets": [
{
"expr": "api_gateway_websocket_connections_active or vector(0)",
"legendFormat": "",
"refId": "A"
}
]
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "orange", "value": 1 },
{ "color": "red", "value": 10 }
]
},
"unit": "reqps"
},
"overrides": []
},
"gridPos": { "h": 4, "w": 4, "x": 16, "y": 1 },
"id": 5,
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"colorMode": "background",
"graphMode": "none"
},
"title": "Rate Limit Rejections/s",
"type": "stat",
"targets": [
{
"expr": "sum(rate(api_gateway_rate_limit_rejected_total[$interval]))",
"legendFormat": "",
"refId": "A"
}
]
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "thresholds" },
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "orange", "value": 0.5 },
{ "color": "red", "value": 2 }
]
},
"unit": "reqps"
},
"overrides": []
},
"gridPos": { "h": 4, "w": 4, "x": 20, "y": 1 },
"id": 6,
"options": {
"reduceOptions": { "calcs": ["lastNotNull"] },
"colorMode": "background",
"graphMode": "none"
},
"title": "Auth Failures/s",
"type": "stat",
"targets": [
{
"expr": "sum(rate(api_gateway_auth_attempts_total{result=\"failure\"}[$interval]))",
"legendFormat": "",
"refId": "A"
}
]
},
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 },
"id": 101,
"title": "Request Patterns",
"type": "row"
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisLabel": "",
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 1,
"pointSize": 5,
"showPoints": "auto",
"stacking": { "mode": "none" }
},
"unit": "reqps"
},
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 },
"id": 7,
"options": {
"tooltip": { "mode": "multi" },
"legend": { "displayMode": "table", "placement": "bottom" }
},
"title": "Request Rate by Handler",
"type": "timeseries",
"targets": [
{
"expr": "topk(10, sum by (handler) (rate(api_gateway_http_requests_total[$interval])))",
"legendFormat": "{{handler}}",
"refId": "A"
}
]
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisLabel": "",
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 1,
"pointSize": 5,
"showPoints": "auto",
"stacking": { "mode": "none" }
},
"unit": "s"
},
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 6 },
"id": 8,
"options": {
"tooltip": { "mode": "multi" },
"legend": { "displayMode": "table", "placement": "bottom" }
},
"title": "Latency by Handler",
"type": "timeseries",
"targets": [
{
"expr": "histogram_quantile(0.50, sum by (le, handler) (rate(api_gateway_request_duration_seconds_bucket[$interval])))",
"legendFormat": "p50 {{handler}}",
"refId": "A"
},
{
"expr": "histogram_quantile(0.95, sum by (le, handler) (rate(api_gateway_request_duration_seconds_bucket[$interval])))",
"legendFormat": "p95 {{handler}}",
"refId": "B"
}
]
},
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 },
"id": 102,
"title": "Auth & Security",
"type": "row"
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisLabel": "",
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 1,
"pointSize": 5,
"showPoints": "auto",
"stacking": { "mode": "none" }
},
"unit": "s"
},
"overrides": []
},
"gridPos": { "h": 8, "w": 8, "x": 0, "y": 15 },
"id": 9,
"options": {
"tooltip": { "mode": "multi" },
"legend": { "displayMode": "table", "placement": "bottom" }
},
"title": "Auth Timing",
"type": "timeseries",
"targets": [
{
"expr": "histogram_quantile(0.50, rate(api_gateway_auth_duration_seconds_bucket[$interval]))",
"legendFormat": "p50",
"refId": "A"
},
{
"expr": "histogram_quantile(0.95, rate(api_gateway_auth_duration_seconds_bucket[$interval]))",
"legendFormat": "p95",
"refId": "B"
},
{
"expr": "histogram_quantile(0.99, rate(api_gateway_auth_duration_seconds_bucket[$interval]))",
"legendFormat": "p99",
"refId": "C"
}
]
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisLabel": "",
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 1,
"pointSize": 5,
"showPoints": "auto",
"stacking": { "mode": "none" }
},
"unit": "ops"
},
"overrides": []
},
"gridPos": { "h": 8, "w": 8, "x": 8, "y": 15 },
"id": 10,
"options": {
"tooltip": { "mode": "multi" },
"legend": { "displayMode": "table", "placement": "bottom" }
},
"title": "RBAC Checks",
"type": "timeseries",
"targets": [
{
"expr": "sum by (result) (rate(api_gateway_rbac_checks_total[$interval]))",
"legendFormat": "{{result}}",
"refId": "A"
}
]
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisLabel": "",
"drawStyle": "bars",
"fillOpacity": 50,
"lineWidth": 1,
"pointSize": 5,
"showPoints": "never",
"stacking": { "mode": "normal" }
},
"unit": "reqps"
},
"overrides": []
},
"gridPos": { "h": 8, "w": 8, "x": 16, "y": 15 },
"id": 11,
"options": {
"tooltip": { "mode": "multi" },
"legend": { "displayMode": "table", "placement": "bottom" }
},
"title": "Rate Limiting by Tier",
"type": "timeseries",
"targets": [
{
"expr": "sum by (tier) (rate(api_gateway_rate_limit_allowed_total[$interval]))",
"legendFormat": "allowed {{tier}}",
"refId": "A"
},
{
"expr": "sum by (tier) (rate(api_gateway_rate_limit_rejected_total[$interval]))",
"legendFormat": "rejected {{tier}}",
"refId": "B"
}
]
},
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 23 },
"id": 103,
"title": "Log Volume",
"type": "row"
},
{
"datasource": { "type": "loki", "uid": "${DS_LOKI}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisLabel": "",
"drawStyle": "line",
"fillOpacity": 30,
"lineWidth": 1,
"pointSize": 5,
"showPoints": "never",
"stacking": { "mode": "normal" }
},
"unit": "short"
},
"overrides": [
{
"matcher": { "id": "byName", "options": "error" },
"properties": [{ "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } }]
},
{
"matcher": { "id": "byName", "options": "warn" },
"properties": [{ "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } }]
},
{
"matcher": { "id": "byName", "options": "info" },
"properties": [{ "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } }]
},
{
"matcher": { "id": "byName", "options": "debug" },
"properties": [{ "id": "color", "value": { "fixedColor": "blue", "mode": "fixed" } }]
}
]
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 24 },
"id": 12,
"options": {
"tooltip": { "mode": "multi" },
"legend": { "displayMode": "table", "placement": "bottom" }
},
"title": "Log Rate by Level",
"type": "timeseries",
"targets": [
{
"expr": "sum by (level) (count_over_time({namespace=\"foxhunt\"} | json | level=~\"$level\" [$interval]))",
"legendFormat": "{{level}}",
"refId": "A"
}
]
},
{
"datasource": { "type": "loki", "uid": "${DS_LOKI}" },
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 24 },
"id": 13,
"options": {
"showTime": true,
"showLabels": true,
"showCommonLabels": false,
"wrapLogMessage": true,
"enableLogDetails": true
},
"title": "Error Logs",
"type": "logs",
"targets": [
{
"expr": "{namespace=\"foxhunt\"} | json | level=\"error\"",
"refId": "A"
}
]
},
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 32 },
"id": 104,
"title": "Log Detail",
"type": "row"
},
{
"datasource": { "type": "loki", "uid": "${DS_LOKI}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisLabel": "",
"drawStyle": "bars",
"fillOpacity": 50,
"lineWidth": 1,
"pointSize": 5,
"showPoints": "never",
"stacking": { "mode": "normal" }
},
"unit": "short"
},
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 33 },
"id": 14,
"options": {
"tooltip": { "mode": "multi" },
"legend": { "displayMode": "table", "placement": "bottom" }
},
"title": "Logs by Service",
"type": "timeseries",
"targets": [
{
"expr": "sum by (app) (count_over_time({namespace=\"foxhunt\", app=~\".+\"} [$interval]))",
"legendFormat": "{{app}}",
"refId": "A"
}
]
},
{
"datasource": { "type": "loki", "uid": "${DS_LOKI}" },
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 33 },
"id": 15,
"options": {
"showTime": true,
"showLabels": true,
"showCommonLabels": false,
"wrapLogMessage": true,
"enableLogDetails": true
},
"title": "Log Stream",
"type": "logs",
"targets": [
{
"expr": "{namespace=\"foxhunt\", app=~\"$service\"} | json | level=~\"$level\"",
"refId": "A"
}
]
},
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 41 },
"id": 105,
"title": "Traces",
"type": "row"
},
{
"datasource": { "type": "tempo", "uid": "${DS_TEMPO}" },
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 42 },
"id": 16,
"options": {},
"title": "Trace Search",
"type": "traces",
"targets": [
{
"queryType": "traceqlSearch",
"refId": "A"
}
]
},
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 50 },
"id": 106,
"title": "Prometheus Self-Monitoring",
"type": "row"
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisLabel": "",
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 1,
"pointSize": 5,
"showPoints": "auto",
"stacking": { "mode": "none" }
},
"unit": "s"
},
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 51 },
"id": 17,
"options": {
"tooltip": { "mode": "multi" },
"legend": { "displayMode": "table", "placement": "bottom" }
},
"title": "Prometheus Scrape Duration",
"type": "timeseries",
"targets": [
{
"expr": "scrape_duration_seconds",
"legendFormat": "{{job}}",
"refId": "A"
}
]
},
{
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisLabel": "",
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 2,
"pointSize": 5,
"showPoints": "never",
"stacking": { "mode": "none" }
},
"mappings": [
{ "options": { "0": { "text": "DOWN", "color": "red" }, "1": { "text": "UP", "color": "green" } }, "type": "value" }
],
"unit": "short",
"min": 0,
"max": 1
},
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 51 },
"id": 18,
"options": {
"tooltip": { "mode": "multi" },
"legend": { "displayMode": "table", "placement": "bottom" }
},
"title": "Targets Up/Down",
"type": "timeseries",
"targets": [
{
"expr": "up",
"legendFormat": "{{job}}",
"refId": "A"
}
]
}
],
"refresh": "15s",
"schemaVersion": 39,
"tags": ["foxhunt", "observability", "logs", "traces"],
"templating": {
"list": [
{
"auto": true,
"auto_count": 30,
"auto_min": "10s",
"current": { "selected": false, "text": "auto", "value": "$__auto_interval_interval" },
"hide": 0,
"label": "Interval",
"name": "interval",
"options": [
{ "selected": false, "text": "1m", "value": "1m" },
{ "selected": false, "text": "5m", "value": "5m" },
{ "selected": false, "text": "15m", "value": "15m" },
{ "selected": false, "text": "30m", "value": "30m" },
{ "selected": false, "text": "1h", "value": "1h" }
],
"query": "1m,5m,15m,30m,1h",
"type": "interval"
},
{
"allValue": ".*",
"current": { "selected": true, "text": ["All"], "value": ["$__all"] },
"datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
"definition": "label_values(up{job=~\"foxhunt.*\"}, job)",
"hide": 0,
"includeAll": true,
"label": "Service",
"multi": true,
"name": "service",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(up{job=~\"foxhunt.*\"}, job)"
},
"refresh": 2,
"type": "query"
},
{
"allValue": ".*",
"current": { "selected": true, "text": ["All"], "value": ["$__all"] },
"hide": 0,
"includeAll": true,
"label": "Level",
"multi": true,
"name": "level",
"options": [
{ "selected": false, "text": "error", "value": "error" },
{ "selected": false, "text": "warn", "value": "warn" },
{ "selected": false, "text": "info", "value": "info" },
{ "selected": false, "text": "debug", "value": "debug" }
],
"query": "error,warn,info,debug",
"type": "custom"
}
]
},
"time": { "from": "now-1h", "to": "now" },
"timepicker": {},
"timezone": "browser",
"title": "Observability & API Gateway",
"uid": "foxhunt-observability",
"version": 1
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,562 +0,0 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus"
},
{
"name": "DS_TEMPO",
"label": "Tempo",
"description": "",
"type": "datasource",
"pluginId": "tempo"
}
],
"id": null,
"uid": "foxhunt-traces",
"title": "Traces",
"description": "Distributed tracing dashboard: span rates, error rates, latency percentiles, service map, trace search",
"tags": [
"foxhunt",
"traces",
"tempo"
],
"timezone": "browser",
"schemaVersion": 39,
"version": 1,
"editable": true,
"refresh": "30s",
"time": {
"from": "now-1h",
"to": "now"
},
"fiscalYearStartMonth": 0,
"liveNow": false,
"weekStart": "",
"templating": {
"list": [
{
"name": "service",
"type": "query",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"query": "label_values(traces_service_graph_request_total, client)",
"refresh": 2,
"multi": true,
"includeAll": true,
"current": {
"selected": true,
"text": "All",
"value": "$__all"
}
}
]
},
"panels": [
{
"id": 1,
"type": "row",
"title": "Overview Stats",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"collapsed": false,
"panels": []
},
{
"id": 2,
"type": "stat",
"title": "Spans/sec",
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"orientation": "auto",
"textMode": "auto",
"colorMode": "background",
"graphMode": "none",
"justifyMode": "center"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "sum(rate(tempo_distributor_spans_received_total[5m]))",
"instant": true
}
]
},
{
"id": 3,
"type": "stat",
"title": "Error Rate",
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"unit": "percent",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 1
},
{
"color": "red",
"value": 5
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"orientation": "auto",
"textMode": "auto",
"colorMode": "background",
"graphMode": "none",
"justifyMode": "center"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "sum(rate(tempo_distributor_spans_received_total{status=\"error\"}[5m])) / sum(rate(tempo_distributor_spans_received_total[5m])) * 100",
"instant": true
}
]
},
{
"id": 4,
"type": "stat",
"title": "Avg Duration",
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"orientation": "auto",
"textMode": "auto",
"colorMode": "background",
"graphMode": "none",
"justifyMode": "center"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "sum(rate(tempo_spanmetrics_latency_sum[5m])) / sum(rate(tempo_spanmetrics_latency_count[5m]))",
"instant": true
}
]
},
{
"id": 5,
"type": "stat",
"title": "Active Services",
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"orientation": "auto",
"textMode": "auto",
"colorMode": "background",
"graphMode": "none",
"justifyMode": "center"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "count(count by (service_name)(tempo_distributor_spans_received_total))",
"instant": true
}
]
},
{
"id": 20,
"type": "row",
"title": "Service Map + Trace Search",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 5
},
"collapsed": false,
"panels": []
},
{
"id": 6,
"type": "nodeGraph",
"title": "Service Map",
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 6
},
"datasource": {
"type": "tempo",
"uid": "${DS_TEMPO}"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "tempo",
"uid": "${DS_TEMPO}"
},
"queryType": "serviceMap"
}
]
},
{
"id": 21,
"type": "row",
"title": "Latency and Errors by Service",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 16
},
"collapsed": false,
"panels": []
},
{
"id": 7,
"type": "timeseries",
"title": "Latency by Service p95",
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 17
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "none",
"showPoints": "auto",
"pointSize": 5,
"lineWidth": 1,
"spanNulls": false,
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"scaleDistribution": {
"type": "linear"
}
},
"color": {
"mode": "palette-classic"
},
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"mean",
"max"
]
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "histogram_quantile(0.95, sum by (le, service_name)(rate(tempo_spanmetrics_latency_bucket[5m])))",
"legendFormat": "{{service_name}}",
"instant": false,
"range": true
}
]
},
{
"id": 8,
"type": "timeseries",
"title": "Error Rate by Service",
"gridPos": {
"h": 7,
"w": 12,
"x": 12,
"y": 17
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"unit": "reqps",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "none",
"showPoints": "auto",
"pointSize": 5,
"lineWidth": 1,
"spanNulls": false,
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"scaleDistribution": {
"type": "linear"
}
},
"color": {
"mode": "palette-classic"
},
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"mean",
"max"
]
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "sum by (service_name)(rate(tempo_distributor_spans_received_total{status=\"error\"}[5m]))",
"legendFormat": "{{service_name}}",
"instant": false,
"range": true
}
]
},
{
"id": 22,
"type": "row",
"title": "Trace Search",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 24
},
"collapsed": false,
"panels": []
},
{
"id": 10,
"type": "table",
"title": "Recent Traces",
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 25
},
"datasource": {
"type": "tempo",
"uid": "${DS_TEMPO}"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "tempo",
"uid": "${DS_TEMPO}"
},
"queryType": "traceql",
"query": "{status = error} || {duration > 1s}",
"limit": 20
}
]
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,841 +0,0 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus"
}
],
"id": null,
"uid": "foxhunt-gpu-overview",
"title": "GPU Overview",
"description": "NVIDIA GPU metrics from DCGM exporter: utilization, memory, temperature, power",
"tags": [
"gpu",
"nvidia",
"dcgm",
"foxhunt"
],
"timezone": "browser",
"schemaVersion": 39,
"version": 1,
"refresh": "15s",
"time": {
"from": "now-1h",
"to": "now"
},
"fiscalYearStartMonth": 0,
"liveNow": false,
"weekStart": "",
"templating": {
"list": [
{
"name": "gpu",
"type": "query",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"query": "label_values(dcgm_gpu_utilization, gpu)",
"refresh": 2,
"includeAll": true,
"multi": true,
"allValue": ".*",
"current": {
"selected": true,
"text": "All",
"value": "$__all"
},
"sort": 1
},
{
"name": "instance",
"type": "query",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"query": "label_values(dcgm_gpu_utilization, instance)",
"refresh": 2,
"includeAll": true,
"multi": true,
"allValue": ".*",
"current": {
"selected": true,
"text": "All",
"value": "$__all"
},
"sort": 1
},
{
"name": "namespace",
"type": "query",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"query": "label_values(dcgm_gpu_utilization, exported_namespace)",
"refresh": 2,
"includeAll": true,
"multi": true,
"allValue": ".*",
"current": {
"selected": true,
"text": "All",
"value": "$__all"
},
"sort": 1
}
]
},
"panels": [
{
"id": 1,
"type": "row",
"title": "GPU Utilization",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"collapsed": false,
"panels": []
},
{
"id": 2,
"type": "timeseries",
"title": "GPU Utilization %",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 20,
"gradientMode": "scheme",
"spanNulls": false,
"showPoints": "never",
"stacking": {
"mode": "none",
"group": "A"
},
"axisPlacement": "auto",
"lineWidth": 2
},
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 80
},
{
"color": "red",
"value": 95
}
]
},
"color": {
"mode": "palette-classic"
},
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"mean",
"max",
"last"
]
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "dcgm_gpu_utilization{gpu=~\"$gpu\", instance=~\"$instance\"}",
"legendFormat": "GPU {{ gpu }} ({{ instance }})"
}
]
},
{
"id": 3,
"type": "gauge",
"title": "Current GPU Utilization",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 1
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "blue",
"value": null
},
{
"color": "green",
"value": 20
},
{
"color": "yellow",
"value": 80
},
{
"color": "red",
"value": 95
}
]
},
"min": 0,
"max": 100,
"unit": "percent",
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"orientation": "auto"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "dcgm_gpu_utilization{gpu=~\"$gpu\", instance=~\"$instance\"}",
"legendFormat": "GPU {{ gpu }}",
"instant": true
}
]
},
{
"id": 10,
"type": "row",
"title": "GPU Memory",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 9
},
"collapsed": false,
"panels": []
},
{
"id": 11,
"type": "timeseries",
"title": "GPU Memory Used",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 10
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 20,
"gradientMode": "scheme",
"spanNulls": false,
"showPoints": "never",
"stacking": {
"mode": "none",
"group": "A"
},
"axisPlacement": "auto",
"lineWidth": 2
},
"unit": "decmbytes",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"color": {
"mode": "palette-classic"
},
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"mean",
"max",
"last"
]
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "dcgm_fb_used{gpu=~\"$gpu\", instance=~\"$instance\"}",
"legendFormat": "GPU {{ gpu }} used"
},
{
"refId": "B",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "(dcgm_fb_used{gpu=~\"$gpu\", instance=~\"$instance\"} + dcgm_fb_free{gpu=~\"$gpu\", instance=~\"$instance\"})",
"legendFormat": "GPU {{ gpu }} total"
}
]
},
{
"id": 12,
"type": "gauge",
"title": "GPU Memory Usage %",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 10
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 70
},
{
"color": "red",
"value": 90
}
]
},
"min": 0,
"max": 100,
"unit": "percent",
"mappings": [],
"color": {
"mode": "thresholds"
}
},
"overrides": []
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"orientation": "auto"
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "(dcgm_fb_used{gpu=~\"$gpu\", instance=~\"$instance\"} / (dcgm_fb_used{gpu=~\"$gpu\", instance=~\"$instance\"} + dcgm_fb_free{gpu=~\"$gpu\", instance=~\"$instance\"})) * 100",
"legendFormat": "GPU {{ gpu }}",
"instant": true
}
]
},
{
"id": 20,
"type": "row",
"title": "GPU Temperature & Power",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 18
},
"collapsed": false,
"panels": []
},
{
"id": 21,
"type": "timeseries",
"title": "GPU Temperature",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 19
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "scheme",
"spanNulls": false,
"showPoints": "never",
"stacking": {
"mode": "none",
"group": "A"
},
"axisPlacement": "auto",
"lineWidth": 2
},
"unit": "celsius",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "blue",
"value": null
},
{
"color": "green",
"value": 40
},
{
"color": "yellow",
"value": 75
},
{
"color": "red",
"value": 85
}
]
},
"color": {
"mode": "palette-classic"
},
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"mean",
"max",
"last"
]
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "dcgm_gpu_temp{gpu=~\"$gpu\", instance=~\"$instance\"}",
"legendFormat": "GPU {{ gpu }} ({{ instance }})"
}
]
},
{
"id": 22,
"type": "timeseries",
"title": "GPU Power Usage",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 19
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "scheme",
"spanNulls": false,
"showPoints": "never",
"stacking": {
"mode": "none",
"group": "A"
},
"axisPlacement": "auto",
"lineWidth": 2
},
"unit": "watt",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"color": {
"mode": "palette-classic"
},
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"mean",
"max",
"last"
]
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "dcgm_power_usage{gpu=~\"$gpu\", instance=~\"$instance\"}",
"legendFormat": "GPU {{ gpu }} ({{ instance }})"
}
]
},
{
"id": 30,
"type": "row",
"title": "GPU Clocks & Per-Pod Usage",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 27
},
"collapsed": false,
"panels": []
},
{
"id": 31,
"type": "timeseries",
"title": "GPU Memory Clock",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 28
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 10,
"gradientMode": "none",
"spanNulls": false,
"showPoints": "never",
"stacking": {
"mode": "none",
"group": "A"
},
"axisPlacement": "auto",
"lineWidth": 2
},
"unit": "hertz",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"color": {
"mode": "palette-classic"
},
"mappings": [],
"custom.transform": "negative-Y"
},
"overrides": []
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"mean",
"max",
"last"
]
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "dcgm_memory_clock{gpu=~\"$gpu\", instance=~\"$instance\"} * 1000000",
"legendFormat": "GPU {{ gpu }} mem clock"
}
]
},
{
"id": 32,
"type": "timeseries",
"title": "Per-Pod GPU Utilization",
"description": "GPU utilization broken down by pod. Requires DCGM exporter pod-level labels (exported_pod, exported_namespace).",
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 28
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 15,
"gradientMode": "none",
"spanNulls": false,
"showPoints": "never",
"stacking": {
"mode": "none",
"group": "A"
},
"axisPlacement": "auto",
"lineWidth": 2
},
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"color": {
"mode": "palette-classic"
},
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"mean",
"max",
"last"
]
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "dcgm_gpu_utilization{exported_namespace=~\"$namespace\", gpu=~\"$gpu\", instance=~\"$instance\"}",
"legendFormat": "{{ exported_namespace }}/{{ exported_pod }} GPU {{ gpu }}"
}
]
},
{
"id": 33,
"type": "timeseries",
"title": "Per-Pod GPU Memory Used",
"description": "GPU framebuffer memory used per pod. Requires DCGM exporter pod-level labels.",
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 36
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"fillOpacity": 15,
"gradientMode": "none",
"spanNulls": false,
"showPoints": "never",
"stacking": {
"mode": "none",
"group": "A"
},
"axisPlacement": "auto",
"lineWidth": 2
},
"unit": "decmbytes",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"color": {
"mode": "palette-classic"
},
"mappings": []
},
"overrides": []
},
"options": {
"tooltip": {
"mode": "multi",
"sort": "desc"
},
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"mean",
"max",
"last"
]
}
},
"targets": [
{
"refId": "A",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"expr": "dcgm_fb_used{exported_namespace=~\"$namespace\", gpu=~\"$gpu\", instance=~\"$instance\"}",
"legendFormat": "{{ exported_namespace }}/{{ exported_pod }} GPU {{ gpu }}"
}
]
}
]
}

View File

@@ -123,16 +123,20 @@ KUBE_NAMESPACE="${KUBE_NAMESPACE:-foxhunt}"
# ConfigMap grouping: name -> list of dashboard files
declare -A CONFIGMAP_GROUPS=(
[grafana-dashboards-cockpits]="foxhunt-cockpit.json foxhunt-trading-cockpit.json foxhunt-training-cockpit.json"
[grafana-dashboards-operations]="foxhunt-overview.json foxhunt-services.json foxhunt-traces.json foxhunt-logs.json"
[grafana-dashboards-infra]="cluster-overview.json gpu-overview.json foxhunt-infrastructure.json foxhunt-gpu-training.json"
[grafana-dashboards-cockpit]="foxhunt-cockpit.json"
[grafana-dashboards-trading]="foxhunt-trading.json"
[grafana-dashboards-training]="foxhunt-training.json"
[grafana-dashboards-infra]="foxhunt-infrastructure.json"
[grafana-dashboards-observability]="foxhunt-observability.json"
)
# Folder mapping: ConfigMap name -> Grafana folder name (used by sidecar annotation)
declare -A CONFIGMAP_FOLDERS=(
[grafana-dashboards-cockpits]="Cockpits"
[grafana-dashboards-operations]="Operations"
[grafana-dashboards-infra]="Infrastructure"
[grafana-dashboards-cockpit]="Foxhunt"
[grafana-dashboards-trading]="Foxhunt"
[grafana-dashboards-training]="Foxhunt"
[grafana-dashboards-infra]="Foxhunt"
[grafana-dashboards-observability]="Foxhunt"
)
deploy_configmaps() {
@@ -221,17 +225,11 @@ else
echo "Skipping ConfigMap deploy (kubectl not available or SKIP_CONFIGMAP=1)."
echo "Falling back to API import..."
for dashboard in "${SCRIPT_DIR}/cluster-overview.json" \
"${SCRIPT_DIR}/gpu-overview.json" \
"${SCRIPT_DIR}/foxhunt-overview.json" \
"${SCRIPT_DIR}/foxhunt-services.json" \
"${SCRIPT_DIR}/foxhunt-gpu-training.json" \
for dashboard in "${SCRIPT_DIR}/foxhunt-cockpit.json" \
"${SCRIPT_DIR}/foxhunt-trading.json" \
"${SCRIPT_DIR}/foxhunt-training.json" \
"${SCRIPT_DIR}/foxhunt-infrastructure.json" \
"${SCRIPT_DIR}/foxhunt-logs.json" \
"${SCRIPT_DIR}/foxhunt-cockpit.json" \
"${SCRIPT_DIR}/foxhunt-trading-cockpit.json" \
"${SCRIPT_DIR}/foxhunt-training-cockpit.json" \
"${SCRIPT_DIR}/foxhunt-traces.json"; do
"${SCRIPT_DIR}/foxhunt-observability.json"; do
if [[ -f "$dashboard" ]]; then
if ! import_dashboard "$dashboard"; then
failed=$((failed + 1))

View File

@@ -166,6 +166,17 @@ data:
- source_labels: [__meta_kubernetes_pod_node_name]
target_label: node
# Argo Workflows controller metrics (HTTPS endpoint)
- job_name: argo-workflows
scheme: https
tls_config:
insecure_skip_verify: true
static_configs:
- targets: ['argo-workflows-workflow-controller-metrics.foxhunt.svc.cluster.local:9090']
relabel_configs:
- target_label: service
replacement: argo-workflows
# Pushgateway (training job metrics)
- job_name: pushgateway
honor_labels: true
@@ -195,7 +206,7 @@ spec:
spec:
serviceAccountName: prometheus
nodeSelector:
k8s.scaleway.com/pool-name: foxhunt
k8s.scaleway.com/pool-name: platform
securityContext:
fsGroup: 65534
runAsNonRoot: true

View File

@@ -1,5 +1,5 @@
# Prometheus egress: allow scraping foxhunt pods, node-exporter, kube-state-metrics,
# DCGM exporter, and kube-system components.
# Prometheus egress: K8s API (service discovery), foxhunt services, node-exporter,
# kube-state-metrics, DCGM exporter, Argo workflow controller, and pushgateway.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
@@ -15,6 +15,17 @@ spec:
policyTypes:
- Egress
egress:
# Kubernetes API server (required for kubernetes_sd_configs service discovery)
# ClusterIP 10.32.0.1:443 NATs to node IP 172.16.0.0/16:6443
- to:
- ipBlock:
cidr: 10.32.0.0/16
ports:
- protocol: TCP
port: 443
- protocol: TCP
port: 6443
# Scrape foxhunt service metrics ports (9091-9098)
- to:
- podSelector:
@@ -23,6 +34,8 @@ spec:
operator: In
values: ["foxhunt", "foxhunt-ci"]
ports:
- protocol: TCP
port: 9090
- protocol: TCP
port: 9091
- protocol: TCP
@@ -40,7 +53,7 @@ spec:
- protocol: TCP
port: 9098
# Scrape foxhunt pods on port 8080 (kube-state-metrics sidecar)
# Scrape foxhunt pods on port 8080 (kube-state-metrics sidecar, health)
- to:
- podSelector:
matchExpressions:
@@ -51,11 +64,13 @@ spec:
- protocol: TCP
port: 8080
# Node-exporter (hostNetwork) + DCGM exporter on node IPs
# Node-exporter (hostNetwork), DCGM exporter, and K8s API on node IPs
- to:
- ipBlock:
cidr: 172.16.0.0/16
ports:
- protocol: TCP
port: 6443
- protocol: TCP
port: 9100
- protocol: TCP
@@ -85,6 +100,15 @@ spec:
- protocol: TCP
port: 9091
# Argo Workflows controller metrics
- to:
- podSelector:
matchLabels:
app.kubernetes.io/name: argo-workflows-workflow-controller
ports:
- protocol: TCP
port: 9090
# Alertmanager
- to:
- podSelector: