RousselTMLEARNING

TP · Prometheus: From Discovery to Expertise

Exporting a batch job's metrics

What you will learn in this TP
  • Install Pushgateway
  • Access the Pushgateway console
  • Send a script's metrics to Pushgateway
  • Using the libraries

Prerequisites #

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.

Pushgateway #

What you will learn in this section
  • Install Pushgateway
  • Access the Pushgateway console
▶ Review the concept presentation video
  1. Deploy the container

    You must deploy a Pushgateway container to collect metrics sent by ephemeral jobs (batches, etc.).

    Find an example docker-compose file with the configuration to deploy Pushgateway here: File.

Sending your metrics to Pushgateway #

What you will learn in this section
  • Send a script's metrics to Pushgateway
  • Using the libraries
▶ Review the concept presentation video
  1. Create the script

    We will create a simple Bash script called non_system_user.sh that lists the number of non-system users on the machine and sends it to Pushgateway.
    INFO: On Linux:
    - Non-system users have a UID (User ID) of 1000 or higher, except nobody (UID 65534).
    - Users are listed in /etc/passwd
  2. Pushgateway instrumentation

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

  3. Verification

    Run the script and check that the data shows up correctly in the Pushgateway console

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

My progress

  • ⏱ Estimated time : ≈ 28 min

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

💬 Ask a question

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

Bonnes pratiques Prometheus : métriques, cardinalité, règles et exploitation

Bonnes pratiques Prometheus : nommage des métriques, labels et cardinalité, intervalles de scrape...

Métriques Datadog avancées : types, agrégations, cardinalité et Metrics without Limits

Maîtriser les métriques Datadog : types (count, rate, gauge, histogram, distribution), agrégation...

Les métriques OpenTelemetry : instruments, temporalité, histogrammes et exemplars

Maîtriser le signal métrique : MeterProvider, instruments synchrones et asynchrones (Counter, UpD...

Vector : les sinks en détail (destinations, lots, tampons et réessais)

Envoyer les événements de Vector : sinks Loki, Elasticsearch, S3, Kafka, OpenTelemetry, Prometheu...

Monitoring de site web : disponibilité, surveillance HTTPS, certificats et performances

Mettre en place le monitoring d'un site web : surveillance de la disponibilité et du HTTPS, expir...

Monitoring et Statistiques dans HAProxy

Comment activer le tableau de bord de statistiques natif et exposer des métriques pour Prometheus.

Vector : les sources en détail

Les sources de Vector : fichiers, logs Kubernetes, journald, syslog, sockets, HTTP, OpenTelemetry...

Corréler traces, métriques, logs et profils avec OpenTelemetry

Relier les quatre signaux pour diagnostiquer vite : ressource commune, trace_id dans les logs, ex...

Métriques Dynatrace : Data Explorer, sélecteurs de métriques, API et tableaux de bord

Exploiter les métriques dans Dynatrace : métriques intégrées et personnalisées, Data Explorer, sy...

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!