====== Monitoring ======
**Destinatari:** DevOps, SRE \\
**Contenuto:** Metriche, Dashboard, Alerting \\
**Strumenti:** Prometheus, Grafana, Alertmanager
Monitoraggio del Data Gateway per rilevamento proattivo errori.
----
===== Workflow =====
flowchart LR
subgraph GATEWAY["DATA GATEWAY"]
G1[/metrics Endpoint]
G2[/health Endpoint]
end
subgraph COLLECT["RACCOLTA"]
P[Prometheus]
end
subgraph VISUAL["VISUALIZZAZIONE"]
GR[Grafana]
end
subgraph ALERT["ALERTING"]
AM[Alertmanager]
E[E-Mail/Slack]
end
G1 --> P
G2 --> P
P --> GR
P --> AM
AM --> E
style G1 fill:#e3f2fd
style P fill:#fff3e0
style GR fill:#e8f5e9
style AM fill:#ffebee
----
===== Runbook =====
^ Runbook ^ Descrizione ^ Durata ^
| [[.:prometheus|Prometheus]] | Raccogliere metriche, Scrape-Config | ~15 Min |
| [[.:grafana-dashboard|Grafana Dashboard]] | Visualizzazione, dashboard predefinite | ~20 Min |
| [[.:alerting|Alerting]] | Soglie, notifiche | ~15 Min |
----
===== Metriche Importanti =====
| Metrica | Descrizione | Soglia |
|--------|--------------|-------------|
| ''http_requests_total'' | Numero richieste HTTP | - |
| ''http_request_duration_seconds'' | Tempo di risposta | < 1s |
| ''http_requests_in_progress'' | Richieste attive | < 100 |
| ''dotnet_gc_memory_total_available_bytes'' | Memoria disponibile | > 100MB |
| ''process_cpu_seconds_total'' | Utilizzo CPU | < 80% |
----
===== Test Rapido =====
# Health Check
curl http://localhost:5000/health
# Metrics (se attivato)
curl http://localhost:5000/metrics
----
===== Runbook Correlati =====
* [[..:tagesgeschaeft:health-check|Health Check]] - Verifica manuale
* [[..:tagesgeschaeft:logs-pruefen|Controllare log]] - Analisi errori
* [[..:sicherheit:start|Sicurezza]] - TLS per Metrics
----
<< [[..:start|<- Manuale Operatore]] | [[.:prometheus|-> Prometheus]] >>
----
//Wolfgang van der Stille @ EMSR DATA d.o.o. - Data Gateway Professional//
{{tag>operator monitoring prometheus grafana}}