mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 11:46:41 +02:00
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:
parent
0a4e7e0f73
commit
4a236a7a1f
14 changed files with 1148 additions and 405 deletions
|
|
@ -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"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue