[TP] Exporter les métriques d'un Batch


Nous allons déployer pushgateway et configurer un script pour lui envoyer des métriques

What you will learn in this TP :
  • Installer pushgateway
  • Accéder à la console de pushgateway
  • Envoyer les métriques d'un script dans Pushgateway
  • Utilisation des librairies

Les prérequis

Vous devez disposer d'une machine avec Docker d'installé. Si vous ne disposez pas d'une machine ou d'un environnement de test, nous vous invitons à faire le TP sur la mise en place de l'environnement de test.

Pushgateway


What you will learn in this section :
  • Installer pushgateway
  • Accéder à la console de pushgateway


Review the concept presentation video

  1. Déployer le conteneur
    Vous devez déployer un conteneur pushgateway pour collecter les métriques envoyés par des tâches éphémères (batch...).

    Retrouvez sur ce lien un exemple de fichier docker-compose qui contient la configuration pour déployer Pushgateway : Fichier.

Vos métriques vers Pushgateway


What you will learn in this section :
  • Envoyer les métriques d'un script dans Pushgateway
  • Utilisation des librairies


Review the concept presentation video

  1. Créer le script
    Nous allons créer un script Bash simple nommé non_system_user.sh qui va lister le nombre d'utilisateurs non système sur la machine et l'envoyer Pushgateway.
    INFORMATION : Sur Linux:
    - Les utilisateurs non systèmes ont des UID (User ID) supérieurs ou égaux à 1000, sauf nobody (UID 65534).
    - Les utilisateurs sont dans /etc/passwd
  2. Instrumentation Pushgateway
    Vous devez déployer un conteneur Node_exporter pour collecter l'ensemble des métriques de la machine. Il doit être ajouté dans le réseau observability.
  3. Vérification
    Vous devez exécuter le script et vérifier que vous avez bien les données dans la console pushgateway

Difficulty level: (4/5)

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

License consumption types

Understand the evolution of billing in Dynatrace: the difference between the ...

Grafana Alloy: The importance of Self-Monitoring

Discover why and how to configure Grafana Alloy so that it monitors itself, c...

Grafana Alloy: Understanding and exploiting the User Interface (UI)

Discover how to enable, secure, and use Grafana Alloy's built-in web interfac...

Grafana Alloy: Introduction and Architecture

Discover the fundamental concepts of Grafana Alloy, the transition from the s...

Grafana Alloy: Syntax and Configuration (Alloy Language)

Master Grafana Alloy's declarative syntax (River language), learn to manipula...

Grafana Alloy: Metrics Collection (Prometheus & Ecosystem)

Learn how to configure Grafana Alloy to collect, transform, and forward metri...

Grafana Alloy: Log Management with Loki

Discover how to configure Grafana Alloy to read log files, journald, or netwo...

Grafana Alloy: Trace Management with Tempo

Dive into distributed trace processing. Learn how to ingest OTLP, Jaeger, or ...

Grafana Alloy: Continuous Profiling with Pyroscope

Discover how to configure continuous profiling in your environments using Gra...

Grafana Alloy: Advanced Deployment and Clustering

Learn how to manage large-scale Grafana Alloy deployments. Configure Clusteri...

Grafana Assistant: AI at the service of observability

Discover Grafana Assistant, the artificial intelligence integrated into Grafa...

Grafana Alloy vs Dynatrace ActiveGate: Which one to choose?

Comparison between Grafana Alloy and Dynatrace ActiveGate. Understand the fun...