61 lines
2.1 KiB
JSON
61 lines
2.1 KiB
JSON
{
|
|
"uid": "boilerplate-overview",
|
|
"title": "Boilerplate — Overview",
|
|
"tags": ["boilerplate", "overview"],
|
|
"timezone": "browser",
|
|
"schemaVersion": 39,
|
|
"refresh": "30s",
|
|
"time": { "from": "now-3h", "to": "now" },
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"type": "stat",
|
|
"title": "Services up",
|
|
"gridPos": { "h": 4, "w": 6, "x": 0, "y": 0 },
|
|
"targets": [
|
|
{ "refId": "A", "expr": "count(up{job=~\"boilerplate-.*\"} == 1)", "datasource": { "uid": "boilerplate-prometheus", "type": "prometheus" } }
|
|
],
|
|
"fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [{ "color": "red", "value": null }, { "color": "green", "value": 3 }] } } }
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "timeseries",
|
|
"title": "HTTP request rate (per service)",
|
|
"gridPos": { "h": 8, "w": 12, "x": 6, "y": 0 },
|
|
"targets": [
|
|
{ "refId": "A", "expr": "sum by (service) (rate(http_requests_total[1m]))", "legendFormat": "{{service}}", "datasource": { "uid": "boilerplate-prometheus", "type": "prometheus" } }
|
|
]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"type": "timeseries",
|
|
"title": "HTTP error ratio (5xx / total)",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 },
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum by (service) (rate(http_requests_total{status=~\"5..\"}[5m])) / clamp_min(sum by (service) (rate(http_requests_total[5m])), 0.001)",
|
|
"legendFormat": "{{service}}",
|
|
"datasource": { "uid": "boilerplate-prometheus", "type": "prometheus" }
|
|
}
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "percentunit", "max": 0.5 } }
|
|
},
|
|
{
|
|
"id": 4,
|
|
"type": "timeseries",
|
|
"title": "HTTP latency p95",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 },
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "histogram_quantile(0.95, sum by (le, service) (rate(http_request_duration_seconds_bucket[5m])))",
|
|
"legendFormat": "{{service}}",
|
|
"datasource": { "uid": "boilerplate-prometheus", "type": "prometheus" }
|
|
}
|
|
],
|
|
"fieldConfig": { "defaults": { "unit": "s" } }
|
|
}
|
|
]
|
|
}
|