Merge pull request #2334 from ikkemaniac/update-nginxlog

Update nginxlog
This commit is contained in:
Slavi Pantaleev 2022-12-12 08:17:43 +02:00 committed by GitHub
commit 6f52e8c64c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 29 deletions

View File

@ -56,7 +56,7 @@
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": 5,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
@ -132,7 +132,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 17 "y": 1
}, },
"id": 20, "id": 20,
"options": { "options": {
@ -154,14 +154,14 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum by(remote_addr) (rate(http_response_count_total{status=~\"1.*\", request_host=~\"$request_host\"}[$__rate_interval]))", "expr": "sum by(http_x_forwarded_for) (rate(http_response_count_total{status=~\"1.*\", request_host=~\"$request_host\"}[$__rate_interval]))",
"hide": false, "hide": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
"refId": "B" "refId": "B"
} }
], ],
"title": "1xx by remote addr [$request_host]", "title": "1xx by upstream addr[$request_host]",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@ -226,7 +226,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 17 "y": 1
}, },
"id": 21, "id": 21,
"options": { "options": {
@ -323,7 +323,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 25 "y": 9
}, },
"id": 18, "id": 18,
"options": { "options": {
@ -345,14 +345,14 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum by(remote_addr) (rate(http_response_count_total{status=~\"2.*\", request_host=~\"$request_host\"}[$__rate_interval]))", "expr": "sum by(http_x_forwarded_for) (rate(http_response_count_total{status=~\"2.*\", request_host=~\"$request_host\"}[$__rate_interval]))",
"hide": false, "hide": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
"refId": "B" "refId": "B"
} }
], ],
"title": "2xx by remote addr [$request_host]", "title": "2xx by upstream addr[$request_host]",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@ -417,7 +417,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 25 "y": 9
}, },
"id": 19, "id": 19,
"options": { "options": {
@ -514,7 +514,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 33 "y": 17
}, },
"id": 16, "id": 16,
"options": { "options": {
@ -536,14 +536,14 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum by(remote_addr) (rate(http_response_count_total{status=~\"3.*\", request_host=~\"$request_host\"}[$__rate_interval]))", "expr": "sum by(http_x_forwarded_for) (rate(http_response_count_total{status=~\"3.*\", request_host=~\"$request_host\"}[$__rate_interval]))",
"hide": false, "hide": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
"refId": "B" "refId": "B"
} }
], ],
"title": "3xx by remote addr [$request_host]", "title": "3xx by upstream addr[$request_host]",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@ -608,7 +608,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 33 "y": 17
}, },
"id": 17, "id": 17,
"options": { "options": {
@ -644,7 +644,7 @@
"type": "timeseries" "type": "timeseries"
} }
], ],
"title": "1xx - 3xx - 2xx Status Code .....................................................", "title": "1xx - 2xx - 3xx Status Code .....................................................",
"type": "row" "type": "row"
}, },
{ {
@ -744,14 +744,14 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum by(remote_addr) (rate(http_response_count_total{status=~\"404\", request_host=~\"$request_host\"}[$__rate_interval]))", "expr": "sum by(http_x_forwarded_for) (rate(http_response_count_total{status=~\"404\", request_host=~\"$request_host\"}[$__rate_interval]))",
"hide": false, "hide": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
"refId": "B" "refId": "B"
} }
], ],
"title": "404 by remote addr [$request_host]", "title": "404 by upstream addr[$request_host]",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@ -935,14 +935,14 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum by(remote_addr) (rate(http_response_count_total{status=~\"4.*\", request_host=~\"$request_host\"}[$__rate_interval]))", "expr": "sum by(http_x_forwarded_for) (rate(http_response_count_total{status=~\"4.*\", request_host=~\"$request_host\"}[$__rate_interval]))",
"hide": false, "hide": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
"refId": "B" "refId": "B"
} }
], ],
"title": "4xx by remote addr [$request_host]", "title": "4xx by upstream addr[$request_host]",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@ -1114,7 +1114,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 11 "y": 3
}, },
"id": 10, "id": 10,
"options": { "options": {
@ -1136,14 +1136,14 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum by(remote_addr, status) (rate(http_response_count_total{status=~\"504|502\", request_host=~\"$request_host\"}[$__rate_interval]))", "expr": "sum by(http_x_forwarded_for, status) (rate(http_response_count_total{status=~\"504|502\", request_host=~\"$request_host\"}[$__rate_interval]))",
"hide": false, "hide": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
"refId": "B" "refId": "B"
} }
], ],
"title": "502-504 by remote addr [$request_host]", "title": "502-504 by upstream addr[$request_host]",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@ -1208,7 +1208,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 11 "y": 3
}, },
"id": 11, "id": 11,
"options": { "options": {
@ -1305,7 +1305,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 19 "y": 11
}, },
"id": 12, "id": 12,
"options": { "options": {
@ -1327,14 +1327,14 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum by(remote_addr) (rate(http_response_count_total{status=~\"5.*\", request_host=~\"$request_host\"}[$__rate_interval]))", "expr": "sum by(http_x_forwarded_for) (rate(http_response_count_total{status=~\"5.*\", request_host=~\"$request_host\"}[$__rate_interval]))",
"hide": false, "hide": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
"refId": "B" "refId": "B"
} }
], ],
"title": "5xx by remote addr [$request_host]", "title": "5xx by upstream addr[$request_host]",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@ -1399,7 +1399,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 19 "y": 11
}, },
"id": 13, "id": 13,
"options": { "options": {
@ -1532,14 +1532,14 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"editorMode": "builder", "editorMode": "builder",
"expr": "sum by(remote_addr) (rate(http_response_count_total{status=~\"[6-9]{1}.*\", request_host=~\"$request_host\"}[$__rate_interval]))", "expr": "sum by(http_x_forwarded_for) (rate(http_response_count_total{status=~\"[6-9]{1}.*\", request_host=~\"$request_host\"}[$__rate_interval]))",
"hide": false, "hide": false,
"legendFormat": "__auto", "legendFormat": "__auto",
"range": true, "range": true,
"refId": "B" "refId": "B"
} }
], ],
"title": "6xx > by remote addr [$request_host]", "title": "6xx > by upstream addr[$request_host]",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@ -1700,6 +1700,6 @@
"timezone": "", "timezone": "",
"title": "NGINX PROXY", "title": "NGINX PROXY",
"uid": "x2_jWNF4k", "uid": "x2_jWNF4k",
"version": 11, "version": 12,
"weekStart": "" "weekStart": ""
} }

View File

@ -23,6 +23,26 @@ namespaces:
split: 2 split: 2
separator: ' ' separator: ' '
matches: matches:
- regexp: "^([^\\?]+)/(public|bundles|fonts|img|themes|vector-icons|element-icons|d|media).*"
replacement: "$1/$2/"
- regexp: "^([^\\?]+).*/rooms/.*/(event|read_markers|messages|receipt|state|typing|members).*"
replacement: "$1/rooms/:roomid:/$2"
- regexp: "^([^\\?]+).*/(r0|v3)/(sync|pushers|keys|devices|download|sendtodevice).*"
replacement: "$1/:v:/$3"
- regexp: "^([^\\?]+).*/rooms/(.*)/send/(.*)"
replacement: "$1/rooms/:roomid:/send/:command:/:id:"
- regexp: "^([^\\?]+).*/client/unstable/.*"
replacement: "$1/client/unstable/:matrixspec:"
- regexp: "^([^\\?]+).*/presence/.*"
replacement: "$1/presence/:userid:"
- regexp: "^([^\\?]+).*/user/.*"
replacement: "$1/user/:userid:"
- regexp: "^([^\\?]+).*/profile/.*"
replacement: "$1/profile/:userid:"
- regexp: "^([^\\?]+).*/directory/room/.*"
replacement: "$1/directory/room/:roomid:"
- regexp: "^([^\\?]+).*/thumbnail/.*"
replacement: "$1/thumbnail/:domain:/:mxid:"
- regexp: "^([^\\?]+)(.*)" - regexp: "^([^\\?]+)(.*)"
replacement: "$1" replacement: "$1"
- target_label: remote_addr - target_label: remote_addr