85 lines
4.0 KiB
JSON
85 lines
4.0 KiB
JSON
{
|
|
"title": "Nginx",
|
|
"uid": "nginx-overview",
|
|
"tags": ["nginx", "reverse-proxy"],
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"refresh": "1m",
|
|
"time": { "from": "now-6h", "to": "now" },
|
|
"timezone": "browser",
|
|
"editable": true,
|
|
"graphTooltip": 1,
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"name": "instance",
|
|
"label": "Host",
|
|
"type": "query",
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"query": { "query": "label_values(up{job=\"nginx\"}, instance)", "refId": "A" },
|
|
"refresh": 2,
|
|
"multi": false,
|
|
"includeAll": false,
|
|
"sort": 1,
|
|
"current": { "selected": false, "text": "", "value": "" }
|
|
}
|
|
]
|
|
},
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"type": "stat",
|
|
"title": "Active Connections",
|
|
"gridPos": { "h": 4, "w": 6, "x": 0, "y": 0 },
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"fieldConfig": { "defaults": { "unit": "short", "color": { "mode": "thresholds" } }, "overrides": [] },
|
|
"options": { "reduceOptions": { "values": false, "calcs": ["lastNotNull"], "fields": "" }, "colorMode": "none", "graphMode": "none", "textMode": "auto", "justifyMode": "auto", "orientation": "auto" },
|
|
"targets": [ { "refId": "A", "expr": "nginx_connections_active{instance=\"$instance\"}" } ]
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "stat",
|
|
"title": "Requests (6h)",
|
|
"gridPos": { "h": 4, "w": 6, "x": 6, "y": 0 },
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"fieldConfig": { "defaults": { "unit": "short", "color": { "mode": "thresholds" } }, "overrides": [] },
|
|
"options": { "reduceOptions": { "values": false, "calcs": ["lastNotNull"], "fields": "" }, "colorMode": "none", "graphMode": "none", "textMode": "auto", "justifyMode": "auto", "orientation": "auto" },
|
|
"targets": [ { "refId": "A", "expr": "sum(increase(nginx_http_requests_total{instance=\"$instance\"}[$__range]))" } ]
|
|
},
|
|
{
|
|
"id": 3,
|
|
"type": "timeseries",
|
|
"title": "Request Rate",
|
|
"gridPos": { "h": 4, "w": 12, "x": 12, "y": 0 },
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"fieldConfig": { "defaults": { "unit": "reqps", "color": { "mode": "palette-classic" }, "custom": { "fillOpacity": 20, "lineWidth": 1, "drawStyle": "line", "showPoints": "never" } }, "overrides": [] },
|
|
"targets": [ { "refId": "A", "expr": "sum(rate(nginx_http_requests_total{instance=\"$instance\"}[$__rate_interval]))", "legendFormat": "requests/s" } ]
|
|
},
|
|
{
|
|
"id": 4,
|
|
"type": "timeseries",
|
|
"title": "Connection States",
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 },
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"fieldConfig": { "defaults": { "unit": "short", "color": { "mode": "palette-classic" }, "custom": { "fillOpacity": 20, "lineWidth": 1, "drawStyle": "line", "showPoints": "never" } }, "overrides": [] },
|
|
"targets": [
|
|
{ "refId": "A", "expr": "nginx_connections_reading{instance=\"$instance\"}", "legendFormat": "reading" },
|
|
{ "refId": "B", "expr": "nginx_connections_writing{instance=\"$instance\"}", "legendFormat": "writing" },
|
|
{ "refId": "C", "expr": "nginx_connections_waiting{instance=\"$instance\"}", "legendFormat": "waiting" }
|
|
]
|
|
},
|
|
{
|
|
"id": 5,
|
|
"type": "timeseries",
|
|
"title": "Connections Accepted / Handled",
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 },
|
|
"datasource": { "type": "prometheus", "uid": "prometheus" },
|
|
"fieldConfig": { "defaults": { "unit": "cps", "color": { "mode": "palette-classic" }, "custom": { "fillOpacity": 10, "lineWidth": 1, "drawStyle": "line", "showPoints": "never" } }, "overrides": [] },
|
|
"targets": [
|
|
{ "refId": "A", "expr": "rate(nginx_connections_accepted{instance=\"$instance\"}[$__rate_interval])", "legendFormat": "accepted" },
|
|
{ "refId": "B", "expr": "rate(nginx_connections_handled{instance=\"$instance\"}[$__rate_interval])", "legendFormat": "handled" }
|
|
]
|
|
}
|
|
]
|
|
}
|