> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Course Introduction

> Hands-on course teaching Grafana and Prometheus for metrics-driven observability, covering instrumentation, PromQL, dashboards, alerts, Kubernetes deployment, and high-cardinality strategies

Hello and welcome to Grafana and Prometheus for metrics-driven observability.

My name is Reece Iriye, and I’ll be your guide through this hands-on course. Modern applications are increasingly distributed and complex, and reliable observability is essential to operate them at scale.

![A presentation slide titled for Grafana/Prometheus showing the text "Modern applications are increasingly distributed and complex" alongside a card displaying "Latency p95 125 ms" with a small trend line. A circular webcam feed of a smiling presenter is visible in the bottom-right.](https://mintcdn.com/kodekloud-c4ac6d9a/qM9vA-hQoWNCxcKa/images/Grafana-Prometheus-for-Metrics-Driven-Observability/Introduction-and-Prerequisites/Course-Introduction/grafana-prometheus-distributed-apps-latency-p95.jpg?fit=max\&auto=format\&n=qM9vA-hQoWNCxcKa\&q=85\&s=769e6b04a3b656e120cfebfbabb2df46)

When running large-scale production services on dynamic cloud-native platforms, knowing what’s happening inside your services and infrastructure is critical for reliability and performance.

Example logs (for context):

```text theme={null}
Logs
payments upstream slow
POST /pay 504 timeout
POST /pay 504 timeout
retry 2/3 bank-api
payments upstream slow
POST /pay 504 timeout
auth token refreshed
GET /search 200 25ms
```

That’s where observability comes in. This course focuses on practical skills with an industry-standard observability stack — Grafana and Prometheus — and the underlying concepts that apply to most metrics-driven monitoring systems.

What you’ll learn

* The four golden signals of monitoring and how they map to real-world metrics
* How to instrument applications and services using Prometheus client libraries and OpenTelemetry
* Writing effective PromQL queries to detect and diagnose issues
* Techniques to prevent high-cardinality explosions and keep your metrics cost-efficient
* Building dynamic Grafana dashboards and configuring alerts for proactive operations

We’ll also dive into practical labs and real Kubernetes environments so you can deploy, configure, and operate the stack yourself.

These labs emphasize active participation: you will deploy Prometheus and Grafana from scratch and use the `kube-prometheus-stack` Helm chart to integrate them with a live Kubernetes cluster.

![Screenshot of an "Order Processing Dashboard" web page with panels for Async Request Rate, Average Processing Latency, and Simulated Error Rate. A small circular video overlay of a presenter appears in the bottom-right corner.](https://mintcdn.com/kodekloud-c4ac6d9a/qM9vA-hQoWNCxcKa/images/Grafana-Prometheus-for-Metrics-Driven-Observability/Introduction-and-Prerequisites/Course-Introduction/order-processing-dashboard-metrics-presenter.jpg?fit=max\&auto=format\&n=qM9vA-hQoWNCxcKa\&q=85\&s=e1418bc0c3be2bcfa17a700a68ee86a5)

Course format and hands-on work

* Deploy the observability stack into Kubernetes (manually and via Helm)
* Scrape targets with Prometheus and explore common scrape configurations
* Instrument sample applications (e.g., FastAPI/Python) with OpenTelemetry + Prometheus client libraries
* Build dashboards and alerts in Grafana, and iterate based on observed signals

Example Kubernetes and Prometheus resources you will encounter and edit:

| Resource | Purpose | Example snippet |
| -: | - | - |
| Deployment | Run Prometheus or Grafana in the `monitoring` namespace | `yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: prometheus\n  namespace: monitoring\nspec:\n  ...\n` |
| Helm chart | Install kube-prometheus-stack to integrate Prometheus + Grafana | See the `kube-prometheus-stack` Helm chart: [https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) |
| Scrape config | Configure what Prometheus scrapes and how often | See the Prometheus scrape excerpt below |

Example Deployments (abbreviated) you’ll work with:

```yaml theme={null}
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: prometheus
  namespace: monitoring
spec:
  ...
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana
  namespace: monitoring
spec:
  ...
```

A typical Prometheus scrape configuration (excerpt):

```yaml theme={null}
global:
  scrape_interval: 15s
  evaluation_interval: 15s
scrape_configs:
  - job_name: "prometheus"
    static_configs:
      - targets: ["localhost:9090"]

  - job_name: "kubernetes-nodes"
    kubernetes_sd_configs:
      - role: node
    relabel_configs:
      - source_labels: [__address__]
        regex: "(.*):10250"
        replacement: "$1:9100"
        target_label: __address__
```

PromQL and metric examples

* A PromQL expression that matches all 5xx responses:

```promql theme={null}
http_requests_total{response_code=~"5.."}
```

* Sample metric family (type and a few series):

```text theme={null}
# TYPE http_requests_total counter
http_requests_total{response_code="200"} 10
http_requests_total{response_code="201"} 2
http_requests_total{response_code="301"} 2
http_requests_total{response_code="500"} 2
http_requests_total{response_code="504"} 2
```

You will instrument application code (for example, FastAPI/Python) using OpenTelemetry and Prometheus client libraries. Instrumentation teaches you how to create meaningful metrics and avoid pitfalls.

High-cardinality: why it matters and how it grows

* Labels (e.g., `provider`, `service`, `endpoint`, `customer_id`) combine multiplicatively.
* Example growth: if you have 3 providers × 2 services × 3 endpoints × 1,000,000 customers = 18,000,000 unique time series.
* Left unchecked, high-cardinality metrics cause storage, performance, and cost issues.

![A presentation slide titled "Why Is High-Cardinality a Problem?" showing a red allocated-threshold bar above a Pod icon and logos for Grafana and Grafana Mimir. A small circular video overlay in the corner shows a presenter speaking.](https://mintcdn.com/kodekloud-c4ac6d9a/qM9vA-hQoWNCxcKa/images/Grafana-Prometheus-for-Metrics-Driven-Observability/Introduction-and-Prerequisites/Course-Introduction/high-cardinality-problem-grafana-mimir-pod.jpg?fit=max\&auto=format\&n=qM9vA-hQoWNCxcKa\&q=85\&s=c224773c3dd0ccd9559dcc751634a230)

High-cardinality labels (for example, per-request IDs or raw user IDs) can create millions of time series. Use aggregation, bucketing, or sampling strategies, and avoid including high-cardinality identifiers as metric labels.

By course end you’ll build dashboards that surface meaningful signals and alerts that catch issues before they become outages.

![A Grafana dashboard showing traffic and network metric charts (total application traffic, pod network traffic, frontend/backend endpoints) for an order-processing system. A small circular video overlay of a presenter appears in the bottom-right.](https://mintcdn.com/kodekloud-c4ac6d9a/qM9vA-hQoWNCxcKa/images/Grafana-Prometheus-for-Metrics-Driven-Observability/Introduction-and-Prerequisites/Course-Introduction/grafana-order-processing-traffic-network-dashboard.jpg?fit=max\&auto=format\&n=qM9vA-hQoWNCxcKa\&q=85\&s=e408838f4ef8e0131b050fd07f272f9f)

Example metric exposition you will see and produce:

```text theme={null}
# HELP http_requests_total The total number of HTTP requests to the backend service.
# TYPE http_requests_total counter
http_requests_total{endpoint="/items",request_method="GET"} 10
http_requests_total{endpoint="/items",request_method="PUT"} 2
http_requests_total{endpoint="/search",request_method="GET"} 4
# HELP node_memory_usage_bytes Current memory usage in bytes.
# TYPE node_memory_usage_bytes gauge
node_memory_usage_bytes{instance="node01"} 536870912
node_memory_usage_bytes{instance="node02"} 268435456
```

Community and next steps
At KodeKloud we support an active community where you can ask questions, share examples, and learn from peers. Engage with the community to reinforce your learning and troubleshoot real operational challenges.

Thank you for joining us — let’s get started.

Links and references

* Prometheus querying (PromQL): [https://prometheus.io/docs/prometheus/latest/querying/basics/](https://prometheus.io/docs/prometheus/latest/querying/basics/)
* Prometheus client libraries: [https://prometheus.io/docs/instrumenting/clientlibs/](https://prometheus.io/docs/instrumenting/clientlibs/)
* OpenTelemetry: [https://opentelemetry.io](https://opentelemetry.io)
* kube-prometheus-stack Helm chart: [https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack)
* Kubernetes documentation: [https://kubernetes.io/docs/](https://kubernetes.io/docs/)

> [card] [Watch Video](https://learn.kodekloud.com/user/courses/grafana-prometheus-for-metrics-driven-observability/module/4f38e984-b54a-4227-8b0c-7c5c2e6b26a6/lesson/d253c750-1389-4406-b577-12afe062993d)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.