Ravindra BagaleCourses & study guides मराठी

Chapter 87: Prometheus and Grafana Monitoring

DevOps

87.11 Comparison, interview questions and revision

Comparison — Prometheus + Grafana vs CloudWatch

Use the card below (loads from your S3 cards bucket). Then read the short table.

Comparison card: Prometheus Grafana vs CloudWatch
Comparison card: Prometheus Grafana vs CloudWatch
Approach Best when Weak when
Prometheus + Grafana Kubernetes and custom app metrics, PromQL, portable dashboards You must run and retain the stack; multi-account AWS needs extra design
CloudWatch AWS-native metrics, logs and alarms with little ops Custom high-cardinality app metrics and complex PromQL-style queries cost more effort
Both Common in real companies: CloudWatch for AWS services, Prometheus for apps on EKS Two systems need clear ownership so alerts do not double-page

Interview questions

Interview card: What is Prometheus?
Interview card: What is Prometheus?
Interview card: Why rate() on counters?
Interview card: Why rate() on counters?
Interview card: What is a ServiceMonitor?
Interview card: What is a ServiceMonitor?
  1. What is Prometheus? — A pull-based metrics system with a TSDB and PromQL.
  2. Counter vs gauge? — Counters only increase (use rate); gauges go up and down.
  3. What is an exporter? — A process that exposes /metrics for something that does not natively speak Prometheus.
  4. ServiceMonitor? — Operator CR that tells Prometheus which Kubernetes Services to scrape.
  5. Recording vs alerting rules? — Recording precomputes series; alerting fires when an expression stays true for for:.
  6. What does Alertmanager do? — Groups, routes, silences and sends notifications.
  7. SLO vs raw threshold? — SLO ties alerts to user journeys and error budgets; raw CPU pages can be noisy.

Revision checklist

Revision card: Prometheus Grafana checklist
Revision card: Prometheus Grafana checklist
  • [ ] I can explain why metrics catch saturation before customers leave.
  • [ ] I can describe scrape → TSDB → PromQL.
  • [ ] I can write a rate() and a simple error-ratio query.
  • [ ] I can curl /metrics and read HELP/TYPE lines.
  • [ ] I can apply a ServiceMonitor and fix label mismatches.
  • [ ] I can install kube-prometheus-stack with Helm on kind.
  • [ ] I keep webhook secrets out of Git.

Quick quiz

Q1. Name two pieces of kube-prometheus-stack.

Prometheus Operator/Prometheus, Grafana, Alertmanager, node exporters — any two.

Q2. Prometheus vs CloudWatch in one line?

Prometheus is portable PromQL metrics often on Kubernetes; CloudWatch is AWS-native metrics, logs and alarms.

Q3. What must never go into Git?

Slack webhooks, SMTP passwords, Grafana admin passwords and cloud access keys.

Ravindra Bagale's Tip

In interviews, say why then what then how, and finish with one PromQL line from this lab — for example rate(http_requests_total[5m]).

In short

  • Metrics show saturation and latency before the outage call.
  • Prometheus scrapes, stores in TSDB and answers PromQL.
  • Exporters and app /metrics feed the system; ServiceMonitor wires Kubernetes.
  • Rules and Alertmanager turn queries into calm pages; Grafana shows the picture.
  • SLOs and burn rates connect alerts to user happiness.
  • Next teaching chapter: AWS EKS for DevOps (chapter 88).

Did you understand? Let us try it once more.