RousselTMLEARNING

TP · Prometheus: From Discovery to Expertise

Deploying exporters with correction

The correction is integrated into the TP (See the green boxes)

What you will learn in this TP
  • Install cAdvisor
  • Access cAdvisor's console and metrics
  • Install Node exporter
  • Access Node exporter's console and metrics
Mode :

All steps and instructions are shown. Recommended for this lab: semi-guided

Prerequisites #

Context. Prometheus only sees what is exposed to it. You deploy cAdvisor and Node exporter to measure containers and the machine.

Prerequisites: a machine with Docker and Docker Compose  ·  Estimated time: 30 min

You must have a machine with Docker installed. If you don't have a machine or test environment, please complete the 'setting up the test environment' lab first.

cAdvisor #

What you will learn in this section
  • Install cAdvisor
  • Access cAdvisor's console and metrics
▶ Review the concept presentation video

Install and configure cAdvisor

  1. Deploy the container

    You must deploy a cAdvisor container to collect all the container metrics present on the machine. It must be added to the observability network.

    Find an example docker-compose file with the configuration to deploy cAdvisor here: File.
    See the correction
    Create a file with the configuration, e.g. docker-compose-cadvisor.yml, and put this configuration in it . Once the file is created, you can run it with the following command:
    docker compose -f docker-compose-cadvisor.yml up -d 
    . If the 'observability' network doesn't exist, you can create it with
    docker network create observability 
  2. Check that it's working

    Verify that the exporter is working correctly and responds on its listening port.

    See the correction
    Just go to:
    http://localhost:8080
  3. Check the metrics

    Verify that the metrics are coming through correctly

    See the correction
    Just go to:
    http://localhost:8080/metrics

Node exporter #

What you will learn in this section
  • Install Node exporter
  • Access Node exporter's console and metrics
▶ Review the concept presentation video
  1. Deploy the container

    You must deploy a Node_exporter container to collect all of the machine's metrics. It must be added to the observability network.

    Find an example docker-compose file with the configuration to deploy cAdvisor here: File.
    See the correction
    Create a file with the configuration, e.g. docker-compose-nodeexporter.yml, and put this configuration in it . Once the file is created, you can run it with the following command:
    docker compose -f docker-compose-nodeexporter.yml up -d 
  2. Check that it's working

    Verify that the exporter is working correctly and responds on its listening port.

    See the correction
    Just go to:
    http://localhost:9100
  3. Check the metrics

    Verify that the metrics are coming through correctly

    See the correction
    Just go to:
    http://localhost:9100/metrics

Validate your work

Check that each goal above is reached and that you get the result described in the introduction.

Difficulty level : ●●●○○ (3/5)

My progress

  • ⏱ Estimated time : ≈ 30 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Course Glossary

Alerting

The process of notifying teams (via email, Slack, Teams) when a specific event, threshold breach, or anomaly is detected.

Architecture

The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.

OpenTelemetry

An open source framework providing standards, APIs, and SDKs to collect and export observability data (traces, metrics, logs) in an agnostic way.

Recommended Articles

Metric types in Prometheus

Discover in detail the four metric types supported by Prometheus (Counter, Gauge, Histogram, Summ...

PromQL: an introduction to the Prometheus query language

Learn PromQL, the Prometheus query language: selectors, rate, sum by, histograms and first querie...

Time-based vs event-based SLO: understanding, computing and choosing (with the Qonto example)

Differences between time-based SLOs (time slices, uptime) and event-based SLOs (good events over ...

The observability trilemma: cost, completeness and performance, and how solutions resolve it

Understanding the observability trilemma (cost, data completeness, query performance), its three ...

Prometheus: alerting with Alertmanager (rules, routing, silences)

Set up Prometheus alerting: alert rules, Alertmanager, routing, grouping, inhibition, silences, S...

Prometheus in the Kubernetes world (Operator, ServiceMonitor, kube-prometheus-stack)

Monitor Kubernetes with Prometheus: service discovery, kube-prometheus-stack, Prometheus Operator...

Mimir: ruler, Alertmanager and mimirtool

Evaluate recording and alerting rules in Mimir, configure the multi-tenant Alertmanager and autom...

Vagrant multi-machine: deploying a ready-to-use Docker Swarm cluster

Use a single Vagrantfile to build a three-node Docker Swarm cluster (one manager, two workers) wi...

Alertmanager: role, architecture and lifecycle of an alert

What Alertmanager does between Prometheus and your teams: deduplication, grouping, routing, silen...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!