The PGA Stack (Prometheus, Grafana, Alertmanager) is the industry standard for cloud-native observability and incident alerting.
┌─────────────────┐ Scrapes /metrics ┌──────────────┐
│ Microservices │ ◄──────────────────────────── │ Prometheus │
│ & NodeExporter │ │ Server │
└─────────────────┘ └──────┬───────┘
│
Queries (PromQL) │ Evaluates AlertRules
┌───────────────────────────────┴───────────────┐
▼ ▼
┌──────────────┐ ┌─────────────────┐
│ Grafana │ │ Alertmanager │
│ (Dashboards) │ │ (Routing & Pager)
└──────────────┘ └────────┬────────┘
│
▼
[Slack / PagerDuty / Email]
A cumulative metric that only increases (or resets to 0 on restart).
rate() or increase(). Never graph raw counters.# Request rate per second over 5 minutes
rate(http_requests_total[5m])
A metric that can go up or down.
# Current node memory in bytes
node_memory_MemAvailable_bytes
Samples observations (usually durations or response sizes) and counts them into configurable buckets.
# Calculate 95th percentile request latency over 5 minutes
histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))
Calculates streaming quantiles directly on the client side.
http_requests_total{status="500", job="api-gateway"}
sum(rate(http_requests_total{status=~"5.."}[5m]))
/
sum(rate(http_requests_total[5m])) * 100
predict_linear(node_filesystem_free_bytes[1h], 4 * 3600) < 0
Real scenario-based DevOps questions, hands-on practice, and clear explanations for every answer.