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
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
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
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.
Verification
Run the script and check that the data shows up correctly in the Pushgateway console
Difficulty level : ●●●●○ (4/5)
My progress
Sign in to track your progress and take notes. Sign in
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
Les types de métriques dans Prometheus
Découvrez en détail les quatre types de métriques supportés par Prometheus (Counter, Gauge, Histo...
PromQL : introduction au langage de requête de Prometheus
Apprendre PromQL, le langage de requête de Prometheus : sélecteurs, rate, sum by, histogrammes et...
Prometheus dans le monde Kubernetes (Operator, ServiceMonitor, kube-prometheus-stack)
Superviser Kubernetes avec Prometheus : service discovery, kube-prometheus-stack, Prometheus Oper...
Grafana Alloy: Metrics Collection (Prometheus & Ecosystem)
Learn how to configure Grafana Alloy to collect, transform, and forward metrics using the Prometh...
Tempo : générer des métriques à partir des traces (service graph, span metrics, exemplars)
Activer le metrics-generator de Tempo : service graphs, span metrics RED, remote write vers Prome...
Grafana Alloy: The importance of Self-Monitoring
Discover why and how to configure Grafana Alloy so that it monitors itself, collecting its own lo...
Prometheus sur Kubernetes et l'interface web de Prometheus
Déployer Prometheus sur Kubernetes avec kube-prometheus-stack (Prometheus Operator, ServiceMonito...
Prometheus : alerter avec Alertmanager (règles, routage, silences)
Mettre en place l'alerting Prometheus : règles d'alerte, Alertmanager, routage, regroupement, inh...
Prometheus : visualiser ses métriques (UI, Grafana et dashboards)
Visualiser les données Prometheus : interface web, graphes PromQL, connexion à Grafana, dashboard...