Files
grafana-dashboards/nginx-monitoring-ingress.json
2025-08-28 10:44:27 +00:00

593 lines
16 KiB
JSON

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 93,
"links": [],
"panels": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.6.0",
"targets": [
{
"direction": "backward",
"editorMode": "code",
"expr": "count_over_time({service_name=\"ingress-nginx\", cluster=\"$cluster\"}[1m])",
"queryType": "range",
"refId": "A"
}
],
"title": "Requests per Minute",
"type": "timeseries"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 8
},
"id": 11,
"options": {
"dedupStrategy": "none",
"enableInfiniteScrolling": false,
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": false,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"pluginVersion": "11.6.0",
"targets": [
{
"direction": "backward",
"editorMode": "code",
"expr": "{service_name=\"ingress-nginx\", cluster=\"$cluster\"} |= \"error\"",
"queryType": "range",
"refId": "K"
}
],
"title": "Latest NGINX Errors",
"type": "logs"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 100,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 1,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 14
},
"id": 17,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.6.0",
"targets": [
{
"direction": "backward",
"editorMode": "code",
"expr": "sum(\r\n count_over_time(\r\n {service_name=\"ingress-nginx\", cluster=\"$cluster\"}\r\n | pattern \"<ip> - - [<timestamp>] \\\"<method> <path> <protocol>\\\" <status> <size> \\\"<referrer>\\\" \\\"<user_agent>\\\" <req_len> <req_time> [<upstream>] [<unknown>] <rest>\"\r\n | status=~\"4..\"\r\n [1m]\r\n )\r\n)",
"legendFormat": "Errors 4**",
"queryType": "range",
"refId": "A"
}
],
"title": "4xx errors per minute",
"type": "timeseries"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 14
},
"id": 4,
"options": {
"dedupStrategy": "none",
"enableInfiniteScrolling": false,
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"pluginVersion": "11.6.0",
"targets": [
{
"direction": "backward",
"editorMode": "code",
"expr": "{service_name=\"ingress-nginx\", cluster=\"$cluster\"}\r\n| pattern \"<ip> - - [<timestamp>] \\\"<method> <path> <protocol>\\\" <status> <size> \\\"<referrer>\\\" \\\"<user_agent>\\\" <req_len> <req_time> [<upstream>] [<unknown>] <rest>\"\r\n| status=~\"4..\"\r\n| line_format \"{{.status}} {{.method}} {{.path}} time={{.req_time}}\"\r\n",
"legendFormat": "",
"queryType": "range",
"refId": "D"
}
],
"title": "4xx Responses ",
"type": "logs"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 22
},
"id": 16,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.6.0",
"targets": [
{
"direction": "backward",
"editorMode": "code",
"expr": "sum(\r\n count_over_time(\r\n {service_name=\"ingress-nginx\", cluster=\"$cluster\"}\r\n | pattern \"<ip> - - [<timestamp>] \\\"<method> <path> <protocol>\\\" <status> <size> \\\"<referrer>\\\" \\\"<user_agent>\\\" <req_len> <req_time> [<upstream>] [<unknown>] <rest>\"\r\n | status=~\"5..\"\r\n [1m]\r\n )\r\n)",
"legendFormat": "Errors 5**",
"queryType": "range",
"refId": "A"
}
],
"title": "5xx errors per minute",
"type": "timeseries"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 22
},
"id": 19,
"options": {
"dedupStrategy": "none",
"enableInfiniteScrolling": false,
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"pluginVersion": "11.6.0",
"targets": [
{
"direction": "backward",
"editorMode": "code",
"expr": "{service_name=\"ingress-nginx\", cluster=\"$cluster\"}\r\n| pattern \"<ip> - - [<timestamp>] \\\"<method> <path> <protocol>\\\" <status> <size> \\\"<referrer>\\\" \\\"<user_agent>\\\" <req_len> <req_time> [<upstream>] [<unknown>] <rest>\"\r\n| status=~\"5..\"\r\n| line_format \"{{.status}} {{.method}} {{.path}} time={{.req_time}}\"\r\n",
"legendFormat": "",
"queryType": "range",
"refId": "D"
}
],
"title": "5xx Responses ",
"type": "logs"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 100,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 1,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 30
},
"id": 15,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.6.0",
"targets": [
{
"direction": "backward",
"editorMode": "code",
"expr": "sum(\r\n count_over_time(\r\n {service_name=\"ingress-nginx\", cluster=\"$cluster\"}\r\n | pattern \"<ip> - - [<timestamp>] \\\"<method> <path> <protocol>\\\" <status> <size> \\\"<referrer>\\\" \\\"<user_agent>\\\" <req_len> <req_time> [<upstream>] [<unknown>] <rest>\"\r\n | status=~\"2..\"\r\n [1m]\r\n )\r\n)",
"legendFormat": "Status 2**",
"queryType": "range",
"refId": "A"
}
],
"title": "2xx status code per minute",
"type": "timeseries"
},
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 30
},
"id": 18,
"options": {
"dedupStrategy": "none",
"enableInfiniteScrolling": false,
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"pluginVersion": "11.6.0",
"targets": [
{
"direction": "backward",
"editorMode": "code",
"expr": "{service_name=\"ingress-nginx\", cluster=\"$cluster\"}\r\n| pattern \"<ip> - - [<timestamp>] \\\"<method> <path> <protocol>\\\" <status> <size> \\\"<referrer>\\\" \\\"<user_agent>\\\" <req_len> <req_time> [<upstream>] [<unknown>] <rest>\"\r\n| status=~\"2..\"\r\n| line_format \"{{.status}} {{.method}} {{.path}} time={{.req_time}}\"\r\n",
"legendFormat": "",
"queryType": "range",
"refId": "D"
}
],
"title": "2xx Responses ",
"type": "logs"
}
],
"preload": false,
"refresh": "30s",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": [
{
"current": {
"text": "local",
"value": "local"
},
"definition": "label_values(cluster)",
"name": "cluster",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(cluster)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "NGINX Monitoring",
"uid": "bewcnab9lgpvkfnewnginx",
"version": 12
}