diff --git a/monitoring/qmem-dashboard.json b/monitoring/qmem-dashboard.json index 4d8154b..b78b628 100644 --- a/monitoring/qmem-dashboard.json +++ b/monitoring/qmem-dashboard.json @@ -75,13 +75,22 @@ "title": "Richieste per endpoint", "gridPos": { "h": 6, "w": 8, "x": 0, "y": 4 }, "datasource": { "type": "prometheus", "uid": "victoriametrics" }, - "targets": [{ "expr": "sum(qmem_requests_total) by (endpoint)", "refId": "A" }], + "targets": [{ "expr": "sum(qmem_requests_total) by (endpoint)", "legendFormat": "{{endpoint}}", "refId": "A" }], "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, - "overrides": [] + "overrides": [ + { "matcher": { "id": "byRegexp", "options": "^/$" }, "properties": [{ "id": "displayName", "value": "Home" }] }, + { "matcher": { "id": "byRegexp", "options": "^/robots\\.txt$" }, "properties": [{ "id": "displayName", "value": "robots.txt" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/memories$" }, "properties": [{ "id": "displayName", "value": "Memorie" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/memories/\\{memory_id\\}$" }, "properties": [{ "id": "displayName", "value": "Memoria per ID" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/memories:search$" }, "properties": [{ "id": "displayName", "value": "Ricerca" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/meta/overview$" }, "properties": [{ "id": "displayName", "value": "Panoramica" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/status$" }, "properties": [{ "id": "displayName", "value": "Stato" }] }, + { "matcher": { "id": "byRegexp", "options": "^/wp-json/.*" }, "properties": [{ "id": "displayName", "value": "Sonda esterna" }] } + ] }, "options": { "orientation": "horizontal", "displayMode": "gradient", "reduceOptions": { "calcs": ["lastNotNull"] } } }, @@ -93,6 +102,7 @@ "targets": [ { "expr": "sum(qmem_request_duration_seconds_sum) by (endpoint) / sum(qmem_request_duration_seconds_count) by (endpoint) * 1000", + "legendFormat": "{{endpoint}}", "refId": "A" } ], @@ -102,18 +112,28 @@ "color": { "mode": "palette-classic" }, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, - "overrides": [] + "overrides": [ + { "matcher": { "id": "byRegexp", "options": "^/$" }, "properties": [{ "id": "displayName", "value": "Home" }] }, + { "matcher": { "id": "byRegexp", "options": "^/robots\\.txt$" }, "properties": [{ "id": "displayName", "value": "robots.txt" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/memories$" }, "properties": [{ "id": "displayName", "value": "Memorie" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/memories/\\{memory_id\\}$" }, "properties": [{ "id": "displayName", "value": "Memoria per ID" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/memories:search$" }, "properties": [{ "id": "displayName", "value": "Ricerca" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/meta/overview$" }, "properties": [{ "id": "displayName", "value": "Panoramica" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/status$" }, "properties": [{ "id": "displayName", "value": "Stato" }] }, + { "matcher": { "id": "byRegexp", "options": "^/wp-json/.*" }, "properties": [{ "id": "displayName", "value": "Sonda esterna" }] } + ] }, "options": { "orientation": "horizontal", "displayMode": "gradient", "reduceOptions": { "calcs": ["lastNotNull"] } } }, { "type": "timeseries", - "title": "Latenza media search (ms)", + "title": "Latenza media search (storica, ms)", "gridPos": { "h": 6, "w": 8, "x": 16, "y": 4 }, "datasource": { "type": "prometheus", "uid": "victoriametrics" }, "targets": [ { - "expr": "sum(rate(qmem_request_duration_seconds_sum{endpoint=\"/v1/memories:search\"}[5m])) / sum(rate(qmem_request_duration_seconds_count{endpoint=\"/v1/memories:search\"}[5m])) * 1000", + "expr": "sum(qmem_request_duration_seconds_sum{endpoint=\"/v1/memories:search\"}) / sum(qmem_request_duration_seconds_count{endpoint=\"/v1/memories:search\"}) * 1000", + "legendFormat": "media storica", "refId": "A" } ], @@ -129,11 +149,20 @@ "gridPos": { "h": 6, "w": 12, "x": 0, "y": 10 }, "datasource": { "type": "prometheus", "uid": "victoriametrics" }, "targets": [ - { "expr": "sum(rate(qmem_requests_total[5m])) by (endpoint)", "refId": "A" } + { "expr": "sum(rate(qmem_requests_total[5m])) by (endpoint)", "legendFormat": "{{endpoint}}", "refId": "A" } ], "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" } }, - "overrides": [] + "overrides": [ + { "matcher": { "id": "byRegexp", "options": "^/$" }, "properties": [{ "id": "displayName", "value": "Home" }] }, + { "matcher": { "id": "byRegexp", "options": "^/robots\\.txt$" }, "properties": [{ "id": "displayName", "value": "robots.txt" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/memories$" }, "properties": [{ "id": "displayName", "value": "Memorie" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/memories/\\{memory_id\\}$" }, "properties": [{ "id": "displayName", "value": "Memoria per ID" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/memories:search$" }, "properties": [{ "id": "displayName", "value": "Ricerca" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/meta/overview$" }, "properties": [{ "id": "displayName", "value": "Panoramica" }] }, + { "matcher": { "id": "byRegexp", "options": "^/v1/status$" }, "properties": [{ "id": "displayName", "value": "Stato" }] }, + { "matcher": { "id": "byRegexp", "options": "^/wp-json/.*" }, "properties": [{ "id": "displayName", "value": "Sonda esterna" }] } + ] }, "options": { "legend": { "displayMode": "table", "placement": "bottom" }, "tooltip": { "mode": "multi" } } },