183 lines
9.4 KiB
JSON
183 lines
9.4 KiB
JSON
{
|
|
"title": "Qmem Memory Gateway",
|
|
"uid": "qmem-gateway",
|
|
"tags": ["qmem", "memory", "ai"],
|
|
"timezone": "browser",
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"editable": true,
|
|
"refresh": "30s",
|
|
"time": { "from": "now-6h", "to": "now" },
|
|
"templating": { "list": [] },
|
|
"panels": [
|
|
{
|
|
"type": "stat",
|
|
"title": "Punti in memoria",
|
|
"gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 },
|
|
"datasource": { "type": "prometheus", "uid": "victoriametrics" },
|
|
"targets": [{ "expr": "qmem_points", "refId": "A" }],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": { "colorMode": "value", "graphMode": "area", "reduceOptions": { "calcs": ["lastNotNull"] } }
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Query di ricerca (ultima ora)",
|
|
"gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 },
|
|
"datasource": { "type": "prometheus", "uid": "victoriametrics" },
|
|
"targets": [{ "expr": "sum(increase(qmem_search_queries_total[1h]))", "refId": "A" }],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"thresholds": { "mode": "absolute", "steps": [ { "color": "blue", "value": null } ] }
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": { "colorMode": "value", "graphMode": "area", "reduceOptions": { "calcs": ["lastNotNull"] } }
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Risultati restituiti (ultima ora)",
|
|
"gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 },
|
|
"datasource": { "type": "prometheus", "uid": "victoriametrics" },
|
|
"targets": [{ "expr": "sum(increase(qmem_search_hits_total[1h]))", "refId": "A" }],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"thresholds": { "mode": "absolute", "steps": [ { "color": "purple", "value": null } ] }
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": { "colorMode": "value", "graphMode": "area", "reduceOptions": { "calcs": ["lastNotNull"] } }
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Errori (ultima ora)",
|
|
"gridPos": { "h": 4, "w": 4, "x": 12, "y": 0 },
|
|
"datasource": { "type": "prometheus", "uid": "victoriametrics" },
|
|
"targets": [{ "expr": "sum(increase(qmem_errors_total[1h]))", "refId": "A" }],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 1 }, { "color": "red", "value": 5 } ] }
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": { "colorMode": "value", "graphMode": "area", "reduceOptions": { "calcs": ["lastNotNull"] } }
|
|
},
|
|
{
|
|
"type": "bargauge",
|
|
"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)", "legendFormat": "{{endpoint}}", "refId": "A" }],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }
|
|
},
|
|
"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": "bargauge",
|
|
"title": "Latenza media per endpoint (ms)",
|
|
"gridPos": { "h": 6, "w": 8, "x": 8, "y": 4 },
|
|
"datasource": { "type": "prometheus", "uid": "victoriametrics" },
|
|
"targets": [
|
|
{
|
|
"expr": "sum(qmem_request_duration_seconds_sum) by (endpoint) / sum(qmem_request_duration_seconds_count) by (endpoint) * 1000",
|
|
"legendFormat": "{{endpoint}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "ms",
|
|
"color": { "mode": "palette-classic" },
|
|
"thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }
|
|
},
|
|
"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 (storica, ms)",
|
|
"gridPos": { "h": 6, "w": 8, "x": 16, "y": 4 },
|
|
"datasource": { "type": "prometheus", "uid": "victoriametrics" },
|
|
"targets": [
|
|
{
|
|
"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"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": { "unit": "ms", "color": { "mode": "palette-classic" } },
|
|
"overrides": []
|
|
},
|
|
"options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }
|
|
},
|
|
{
|
|
"type": "timeseries",
|
|
"title": "Richieste al minuto",
|
|
"gridPos": { "h": 6, "w": 12, "x": 0, "y": 10 },
|
|
"datasource": { "type": "prometheus", "uid": "victoriametrics" },
|
|
"targets": [
|
|
{ "expr": "sum(rate(qmem_requests_total[5m])) by (endpoint)", "legendFormat": "{{endpoint}}", "refId": "A" }
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": { "color": { "mode": "palette-classic" } },
|
|
"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" } }
|
|
},
|
|
{
|
|
"type": "timeseries",
|
|
"title": "Punti in memoria nel tempo",
|
|
"gridPos": { "h": 6, "w": 12, "x": 12, "y": 10 },
|
|
"datasource": { "type": "prometheus", "uid": "victoriametrics" },
|
|
"targets": [{ "expr": "qmem_points", "refId": "A" }],
|
|
"fieldConfig": {
|
|
"defaults": { "color": { "mode": "palette-classic" } },
|
|
"overrides": []
|
|
},
|
|
"options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }
|
|
}
|
|
]
|
|
}
|