From 4161fbbdd5f36c355667feacb786f4158170fc01 Mon Sep 17 00:00:00 2001 From: Socheat Sok Date: Fri, 28 Jun 2024 16:21:42 +0700 Subject: [PATCH] Update README.md --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 09bb04b..097b42b 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,12 @@ The Prometheus monitoring system and time series database customized for Docker - A standard metrics labeling for Docker Swarm compatible scrape configs (i.e. nodes, services and tasks). - Provide a Kubernetes compatible labels, this grant us the ability to reuse some of the already existing Grafana Dashboard already built for Kubernetes. -## Deployment +## Features -> WIP +- Automatically discover and scrape the metrics from the Docker Swarm nodes, services and tasks. +- Ability to configure scrape target via Docker object labels. +- Dynamically inject scrape configs from Docker configs. +- Automatically reload the Prometheus configuration when the Docker configs are create/update/remove. ## How to use @@ -47,6 +50,19 @@ networks: external: true ``` +## Prometheus Kubernetes compatible labels + +Here is a list of Docker Service/Task labels that are mapped to Kubernetes labels. + +| Kubernetes | Docker | Scrape config | +| ------------ | ------------------------------------------------------------- | ------------------------------ | +| `namespace` | `__meta_dockerswarm_service_label_com_docker_stack_namespace` | | +| `deployment` | `__meta_dockerswarm_service_name` | | +| `pod` | `dockerswarm_task_name` | `promstack/tasks` | +| `service` | `__meta_dockerswarm_service_name` | `promstack/services-endpoints` | + +* **dockerswarm_task_name**: A combination of the service name, slot and task id. + ## References - https://prometheus.io/docs/prometheus/latest/configuration/configuration/