From 0a6bb9ab0f98166c988ebea1042e37dc82f59ecf Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Wed, 20 Nov 2024 20:42:28 +0100 Subject: [PATCH] Expose Prometheus exporter to the outside world --- .app_version | 2 +- CHANGELOG.md | 27 +++++++++++++++++++++++++++ Procfile.prometheus.dev | 2 +- docker-compose.yml | 5 +++++ 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.app_version b/.app_version index c3f65805..427cda05 100644 --- a/.app_version +++ b/.app_version @@ -1 +1 @@ -0.16.6 +0.16.7 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aa52b7a..f0b86b1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +# 0.16.7 - 2024-11-20 + +### Changed + +- Prometheus exporter is now bound to 0.0.0.0 instead of localhost +- `PROMETHEUS_EXPORTER_HOST` and `PROMETHEUS_EXPORTER_PORT` env vars were added to the `docker-compose.yml` file to allow you to set the host and port for the Prometheus exporter. They should be added to both `dawarich_app` and `dawarich_sidekiq` services Example: + +```diff + dawarich_app: + image: freikin/dawarich:latest + container_name: dawarich_app + environment: + ... + PROMETHEUS_EXPORTER_ENABLED: "true" ++ PROMETHEUS_EXPORTER_HOST: 0.0.0.0 ++ PROMETHEUS_EXPORTER_PORT: "9394" + + dawarich_sidekiq: + image: freikin/dawarich:latest + container_name: dawarich_sidekiq + environment: + ... + PROMETHEUS_EXPORTER_ENABLED: "true" ++ PROMETHEUS_EXPORTER_HOST: dawarich_app ++ PROMETHEUS_EXPORTER_PORT: "9394" +``` + # 0.16.6 - 2024-11-20 ### Added diff --git a/Procfile.prometheus.dev b/Procfile.prometheus.dev index 2f1921fb..965e5e25 100644 --- a/Procfile.prometheus.dev +++ b/Procfile.prometheus.dev @@ -1,2 +1,2 @@ +prometheus_exporter: bundle exec prometheus_exporter -b 0.0.0.0 web: bin/rails server -p 3000 -b 0.0.0.0 -prometheus_exporter: bundle exec prometheus_exporter diff --git a/docker-compose.yml b/docker-compose.yml index bd3d2049..947b6e89 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -66,6 +66,8 @@ services: PHOTON_API_HOST: photon.komoot.io PHOTON_API_USE_HTTPS: true PROMETHEUS_EXPORTER_ENABLED: false + PROMETHEUS_EXPORTER_HOST: "0.0.0.0" + PROMETHEUS_EXPORTER_PORT: 9394 logging: driver: "json-file" options: @@ -117,6 +119,9 @@ services: DISTANCE_UNIT: km PHOTON_API_HOST: photon.komoot.io PHOTON_API_USE_HTTPS: true + PROMETHEUS_EXPORTER_ENABLED: false + PROMETHEUS_EXPORTER_HOST: dawarich_app + PROMETHEUS_EXPORTER_PORT: 9394 logging: driver: "json-file" options: