# Monitoring & Observability — Cheat Sheet
Metgud TechHub · Learn • Build • Master

## Commands & snippets
1. PromQL: up
2. rate(http_requests_total[5m])
3. 100 - (avg by(instance)(rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
4. histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))
5. LogQL (Loki): {app="web"} |= "error"
6. SLI = good events / total events ; SLO = target for the SLI ; error budget = 1 - SLO
