Files
grafana-dashboards/nginx-monitoring-ingress.json

587 lines
15 KiB
JSON
Raw Normal View History

2025-08-13 14:57:02 +00:00
{
"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": 31,
"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({job=\"$job\"} [1m])",
"queryType": "range",
"refId": "A"
}
],
"title": "Requests per Minute",
"type": "timeseries"
},
{
"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": [
{
"expr": "{job=\"$job\"} |= \"error\"",
"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 {job=\"$job\"}\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": "{job=\"$job\"}\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 {job=\"$job\"}\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"
},
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 22
},
"id": 5,
"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": "{job=\"$job\"}\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}}\"",
"queryType": "range",
"refId": "E"
}
],
"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 {job=\"$job\"}\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": "{job=\"$job\"}\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": [
"nginx"
],
"templating": {
"list": [
{
"current": {
"text": "ingress-nginx/controller",
"value": "ingress-nginx/controller"
},
"datasource": "Loki",
"definition": "",
"name": "job",
"options": [],
"query": {
"label": "job",
"refId": "LokiVariableQueryEditor-VariableQuery",
"stream": "{job=~\".*ingress.*/controller\"}",
"type": 1
},
"refresh": 1,
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "NGINX Monitoring",
"uid": "een8aog8vuakge",
"version": 34
}