{"repo":"Sqooba/prometheus-docker-labels-discovery","free":true,"listed":false,"github":"https://github.com/Sqooba/prometheus-docker-labels-discovery","clone":"git clone https://github.com/Sqooba/prometheus-docker-labels-discovery.git","description":"Discover prometheus scraping endpoints in plain docker and docker-compose environment","language":"Go","stars":20,"topics":["docker","prometheus","discovery-service"],"license":null,"category":"deployment-docker-iac","readme_excerpt":"Discover docker containers to scrape based on labels ==== This tool aims at discovering containers running with prometheus.io/scrape=true annotations from a given docker engine, and auto-configure prometheus for scraping. This tool is standalone and write the discovered containers (services) in a file, which is in turn passed to Prometheus file service discovery to start the scraping jobs. Example via a docker-compose The following part is giving a complete example of configuring the docker-labels discovery mechanism. It is based in three parts, namely: - Configure prometheus-docker-labels-discovery - Configure Prometheus file sd configs - Configure your services Configure prometheus-docker-labels-discovery Configure Prometheus Prometheus needs to be configured using file sd configs scrape config. Configure your services Any service can now be configured using docker labels. The following example shows in docker-compose style how this looks like: The exhaustive list of labels to configure properly your service is provided below: Annotation Definition Example ---------- ---------- ------- prometheus.io/scrape Main label to ensure this container will be scraped by Prometheus. Required value is true . Any other value will not be considered. prometheus.io/scrape=true prometheus.io/port Specify which port to use for the scraping. In case of a single port exposed, this configuration can be omitted. prometheus.io/port=8080 prometheus.io/path Alternative path for scraping the metrics","default_branch":null,"files":null,"tree":[],"storefront":"/r/Sqooba","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Sqooba/prometheus-docker-labels-discovery/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}