Files
grafana-dashboards/dashboards/traefik.json
T

444 lines
9.7 KiB
JSON

{
"editable": true,
"graphTooltip": 0,
"id": 3619608083947520,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 2,
"unit": "reqps"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"colorMode": "value",
"graphMode": "area",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "sum(rate(traefik_entrypoint_requests_total{entrypoint=~\"$entrypoint\"}[5m]))",
"refId": "A"
}
],
"title": "Request rate (req/s)",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"decimals": 2,
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 1
},
{
"color": "red",
"value": 5
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 0
},
"id": 2,
"options": {
"colorMode": "background",
"graphMode": "area",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "100 * (sum(rate(traefik_service_requests_total{code=~\"5..\",service=~\"$service\"}[5m])) or vector(0)) / clamp_min(sum(rate(traefik_service_requests_total{service=~\"$service\"}[5m])), 0.001)",
"refId": "A"
}
],
"title": "5xx rate (%)",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"decimals": 0,
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 12,
"y": 0
},
"id": 3,
"options": {
"colorMode": "value",
"graphMode": "area",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "sum(traefik_open_connections)",
"refId": "A"
}
],
"title": "Open connections",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"decimals": 1,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "yellow",
"value": 14
},
{
"color": "green",
"value": 30
}
]
},
"unit": "d"
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 6,
"x": 18,
"y": 0
},
"id": 4,
"options": {
"colorMode": "background",
"reduceOptions": {
"calcs": [
"lastNotNull"
]
}
},
"targets": [
{
"expr": "min(traefik_tls_certs_not_after - time()) / 86400",
"refId": "A"
}
],
"title": "Cert days remaining (min)",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 2,
"stacking": {
"mode": "normal"
}
},
"unit": "reqps"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 4
},
"id": 5,
"options": {
"legend": {
"calcs": [
"mean",
"max"
],
"displayMode": "table",
"placement": "bottom"
}
},
"targets": [
{
"expr": "sum by (entrypoint) (rate(traefik_entrypoint_requests_total{entrypoint=~\"$entrypoint\"}[5m]))",
"legendFormat": "{{entrypoint}}",
"refId": "A"
}
],
"title": "Requests per second by entrypoint",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "bars",
"fillOpacity": 80,
"lineWidth": 1,
"stacking": {
"mode": "normal"
}
},
"unit": "reqps"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 4
},
"id": 6,
"options": {
"legend": {
"calcs": [
"mean"
],
"displayMode": "table",
"placement": "bottom"
}
},
"targets": [
{
"expr": "sum by (code) (rate(traefik_service_requests_total{service=~\"$service\"}[5m]))",
"legendFormat": "{{code}}",
"refId": "A"
}
],
"title": "Response codes by service",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"fillOpacity": 0,
"lineWidth": 2
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 12
},
"id": 7,
"options": {
"legend": {
"calcs": [
"mean",
"max"
],
"displayMode": "table",
"placement": "bottom"
}
},
"targets": [
{
"expr": "histogram_quantile(0.50, sum by (le) (rate(traefik_service_request_duration_seconds_bucket{service=~\"$service\"}[5m])))",
"legendFormat": "p50",
"refId": "A"
},
{
"expr": "histogram_quantile(0.95, sum by (le) (rate(traefik_service_request_duration_seconds_bucket{service=~\"$service\"}[5m])))",
"legendFormat": "p95",
"refId": "B"
},
{
"expr": "histogram_quantile(0.99, sum by (le) (rate(traefik_service_request_duration_seconds_bucket{service=~\"$service\"}[5m])))",
"legendFormat": "p99",
"refId": "C"
}
],
"title": "Service latency (p50 / p95 / p99)",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"fillOpacity": 10,
"lineWidth": 2
},
"unit": "Bps"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 12
},
"id": 8,
"options": {
"legend": {
"calcs": [
"mean",
"max"
],
"displayMode": "table",
"placement": "bottom"
}
},
"targets": [
{
"expr": "sum by (entrypoint) (rate(traefik_entrypoint_requests_bytes_total{entrypoint=~\"$entrypoint\"}[5m]))",
"legendFormat": "in {{entrypoint}}",
"refId": "A"
},
{
"expr": "-sum by (entrypoint) (rate(traefik_entrypoint_responses_bytes_total{entrypoint=~\"$entrypoint\"}[5m]))",
"legendFormat": "out {{entrypoint}}",
"refId": "B"
}
],
"title": "Bytes in / out by entrypoint",
"type": "timeseries"
}
],
"refresh": "30s",
"schemaVersion": 39,
"tags": [
"traefik",
"homelab"
],
"templating": {
"list": [
{
"current": {
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"includeAll": true,
"label": "Entrypoint",
"multi": true,
"name": "entrypoint",
"query": {
"query": "label_values(traefik_entrypoint_requests_total, entrypoint)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 2,
"type": "query"
},
{
"current": {
"text": "All",
"value": "$__all"
},
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"includeAll": true,
"label": "Service",
"multi": true,
"name": "service",
"query": {
"query": "label_values(traefik_service_requests_total, service)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 2,
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timezone": "browser",
"title": "traefik",
"uid": "traefik-homelab",
"version": 1
}