WIP: Development changes moved from master

- Modified Grafana dashboards
- Updated message sender and metrics collector
- Added new rate limiting dashboard
- Removed count_tests.py
This commit is contained in:
2025-09-05 01:29:28 +03:00
parent 7d08575512
commit 40968dd075
7 changed files with 1584 additions and 93 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -84,7 +84,7 @@
"unit": "percent"
}
},
"gridPos": {"h": 8, "w": 6, "x": 12, "y": 0}
"gridPos": {"h": 8, "w": 6, "x": 18, "y": 16}
},
{
"id": 4,
@@ -139,7 +139,7 @@
}
}
},
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8}
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 16}
},
{
"id": 5,
@@ -159,7 +159,7 @@
"unit": "s"
}
},
"gridPos": {"h": 8, "w": 6, "x": 12, "y": 8}
"gridPos": {"h": 8, "w": 6, "x": 12, "y": 16}
},
{
"id": 6,
@@ -186,7 +186,7 @@
"unit": "percent"
}
},
"gridPos": {"h": 8, "w": 6, "x": 0, "y": 16}
"gridPos": {"h": 8, "w": 6, "x": 12, "y": 16}
},
{
"id": 7,
@@ -213,7 +213,154 @@
"unit": "percent"
}
},
"gridPos": {"h": 8, "w": 6, "x": 6, "y": 16}
"gridPos": {"h": 8, "w": 6, "x": 18, "y": 16}
},
{
"id": 8,
"title": "CPU Usage Gauge",
"type": "gauge",
"targets": [
{
"expr": "cpu_usage_percent",
"legendFormat": "CPU %"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"steps": [
{"color": "green", "value": null},
{"color": "yellow", "value": 70},
{"color": "red", "value": 90}
]
},
"unit": "percent",
"min": 0,
"max": 100
}
},
"options": {
"orientation": "auto",
"reduceOptions": {
"values": false,
"calcs": ["lastNotNull"],
"fields": ""
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"gridPos": {"h": 8, "w": 6, "x": 12, "y": 0}
},
{
"id": 9,
"title": "RAM Usage Gauge",
"type": "gauge",
"targets": [
{
"expr": "ram_usage_percent",
"legendFormat": "RAM %"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"steps": [
{"color": "green", "value": null},
{"color": "yellow", "value": 70},
{"color": "red", "value": 90}
]
},
"unit": "percent",
"min": 0,
"max": 100
}
},
"options": {
"orientation": "auto",
"reduceOptions": {
"values": false,
"calcs": ["lastNotNull"],
"fields": ""
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"gridPos": {"h": 8, "w": 6, "x": 18, "y": 0}
},
{
"id": 10,
"title": "System Resources Overview",
"type": "timeseries",
"targets": [
{
"expr": "cpu_usage_percent",
"legendFormat": "CPU %"
},
{
"expr": "ram_usage_percent",
"legendFormat": "RAM %"
},
{
"expr": "disk_usage_percent",
"legendFormat": "Disk %"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "Usage %",
"axisPlacement": "left",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 20,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"vis": false
},
"lineInterpolation": "linear",
"lineWidth": 2,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"unit": "percent",
"min": 0,
"max": 100
}
},
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8}
}
],
"time": {

View File

@@ -899,6 +899,190 @@
],
"title": "Database Query Time (P95)",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"vis": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 40
},
"id": 11,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"expr": "topk(5, sum by(content_type) (rate(media_processing_total[5m])))",
"refId": "A"
}
],
"title": "Top Media Types",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"vis": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 12,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"expr": "histogram_quantile(0.5, rate(file_download_size_bytes_bucket[5m])) by (content_type)",
"refId": "A",
"legendFormat": "{{content_type}} P50"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"expr": "histogram_quantile(0.95, rate(file_download_size_bytes_bucket[5m])) by (content_type)",
"refId": "B",
"legendFormat": "{{content_type}} P95"
}
],
"title": "File Download Size Distribution",
"type": "timeseries"
}
],
"refresh": "5s",