feat(todo): add Prometheus metrics and update docs

- Add MetricsModule with prom-client for todo backend
- Add MetricsInterceptor for request tracking
- Update COMMANDS.md with presi and storage commands
- Update Grafana dashboards for backend monitoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Till-JS 2026-01-25 13:31:44 +01:00
parent 0a4e7e0f73
commit 4a236a7a1f
14 changed files with 1148 additions and 405 deletions

View file

@ -61,8 +61,8 @@
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "rate(container_cpu_usage_seconds_total{name=~\".+\"}[5m]) * 100",
"legendFormat": "{{name}}",
"expr": "sum(rate(container_cpu_usage_seconds_total{id=~\"/docker/.+\"}[5m])) by (id) * 100",
"legendFormat": "{{id}}",
"refId": "A"
}
],
@ -114,8 +114,8 @@
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "container_memory_usage_bytes{name=~\".+\"}",
"legendFormat": "{{name}}",
"expr": "container_memory_usage_bytes{id=~\"/docker/.+\"}",
"legendFormat": "{{id}}",
"refId": "A"
}
],

View file

@ -138,7 +138,7 @@
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "(1 - (node_filesystem_avail_bytes{mountpoint=\"/\"} / node_filesystem_size_bytes{mountpoint=\"/\"})) * 100",
"expr": "(1 - (node_filesystem_avail_bytes{mountpoint=~\"/host_mnt/Users|/\"} / node_filesystem_size_bytes{mountpoint=~\"/host_mnt/Users|/\"})) * 100",
"refId": "A"
}
],
@ -177,7 +177,7 @@
"targets": [
{
"datasource": { "type": "prometheus", "uid": "${datasource}" },
"expr": "count(container_last_seen{name=~\".+\"})",
"expr": "count(container_last_seen{id=~\"/docker/.+\"})",
"refId": "A"
}
],