curl http://…/metrics |
what the service exposes right now |
kubectl get prometheusrule -n <ns> |
the rules in your namespace |
kubectl scale deployment api-staging --replicas=0 |
the drill |
http_requests_total{namespace="…"} |
the latest sample of every matching series |
rate(x_total[1m]) · increase(x_total[2m]) |
per second · total, over the window |
sum by (status) (rate(…)) |
add across pods, keep one label |
a / b |
a ratio; or vector(0) when the numerator may be empty |
histogram_quantile(0.95, sum by (le) (rate(x_bucket[5m]))) |
the 95th percentile; le stays in the by |
up == 0 |
targets that did not answer |
kube_deployment_status_replicas_available |
pods ready, from kube-state-metrics |
http://prometheus.k8s.digivader.com/ |
the course Prometheus: a query, the targets, the rules |
http://grafana.k8s.digivader.com/ |
the course Grafana: the dashboard, the rules' state, the alerts |