Skip to content

Commit 9210faf

Browse files
committed
fix: сделать security stat-карточки в Grafana наглядными
Что сделано: - для карточек 401/403/429 включен режим отображения value вместо background - убраны фильтры method/path из expr, чтобы карточки показывали глобальные security события - сохранены instant-запросы и округление значений - повышена версия дашборда для корректного применения provisioning
1 parent 7770522 commit 9210faf

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

monitoring/grafana/provisioning/dashboards/json/task-manager-observability.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -877,9 +877,9 @@
877877
},
878878
"id": 11,
879879
"options": {
880-
"colorMode": "background",
880+
"colorMode": "value",
881881
"graphMode": "none",
882-
"justifyMode": "auto",
882+
"justifyMode": "center",
883883
"orientation": "auto",
884884
"reduceOptions": {
885885
"calcs": [
@@ -888,12 +888,12 @@
888888
"fields": "",
889889
"values": false
890890
},
891-
"textMode": "auto"
891+
"textMode": "value"
892892
},
893893
"targets": [
894894
{
895895
"editorMode": "code",
896-
"expr": "round(sum(increase(http_requests_total{status=\"401\", method=~\"$method\", path=~\"$path\"}[5m])) or vector(0))",
896+
"expr": "round(sum(increase(http_requests_total{status=\"401\"}[5m])) or vector(0))",
897897
"legendFormat": "",
898898
"range": false,
899899
"refId": "A",
@@ -945,9 +945,9 @@
945945
},
946946
"id": 12,
947947
"options": {
948-
"colorMode": "background",
948+
"colorMode": "value",
949949
"graphMode": "none",
950-
"justifyMode": "auto",
950+
"justifyMode": "center",
951951
"orientation": "auto",
952952
"reduceOptions": {
953953
"calcs": [
@@ -956,12 +956,12 @@
956956
"fields": "",
957957
"values": false
958958
},
959-
"textMode": "auto"
959+
"textMode": "value"
960960
},
961961
"targets": [
962962
{
963963
"editorMode": "code",
964-
"expr": "round(sum(increase(http_requests_total{status=\"403\", method=~\"$method\", path=~\"$path\"}[5m])) or vector(0))",
964+
"expr": "round(sum(increase(http_requests_total{status=\"403\"}[5m])) or vector(0))",
965965
"legendFormat": "",
966966
"range": false,
967967
"refId": "A",
@@ -1013,9 +1013,9 @@
10131013
},
10141014
"id": 13,
10151015
"options": {
1016-
"colorMode": "background",
1016+
"colorMode": "value",
10171017
"graphMode": "none",
1018-
"justifyMode": "auto",
1018+
"justifyMode": "center",
10191019
"orientation": "auto",
10201020
"reduceOptions": {
10211021
"calcs": [
@@ -1024,12 +1024,12 @@
10241024
"fields": "",
10251025
"values": false
10261026
},
1027-
"textMode": "auto"
1027+
"textMode": "value"
10281028
},
10291029
"targets": [
10301030
{
10311031
"editorMode": "code",
1032-
"expr": "round(sum(increase(http_requests_total{status=\"429\", method=~\"$method\", path=~\"$path\"}[5m])) or vector(0))",
1032+
"expr": "round(sum(increase(http_requests_total{status=\"429\"}[5m])) or vector(0))",
10331033
"legendFormat": "",
10341034
"range": false,
10351035
"refId": "A",
@@ -1115,6 +1115,6 @@
11151115
"timezone": "",
11161116
"title": "Task Manager API - Observability",
11171117
"uid": "task-manager-observability",
1118-
"version": 3,
1118+
"version": 4,
11191119
"weekStart": ""
11201120
}

0 commit comments

Comments
 (0)