From 4dc267e11fd81335223a1fbb58d3c02039ea36f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C3=B3=C5=82grabia?= Date: Sat, 14 Dec 2024 02:20:10 +0100 Subject: [PATCH] Small changes in auth for web prometheus. --- 2024/12/grafana_demo1/app.yaml | 9 +++++++-- 2024/12/grafana_demo1/prometheus.web.yml | 2 ++ .../grafana_demo1/{datasources.yaml => prometheus.yml} | 0 2024/12/grafana_demo1/setup.yaml | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 2024/12/grafana_demo1/prometheus.web.yml rename 2024/12/grafana_demo1/{datasources.yaml => prometheus.yml} (100%) diff --git a/2024/12/grafana_demo1/app.yaml b/2024/12/grafana_demo1/app.yaml index 32799c7..f1e6f6d 100644 --- a/2024/12/grafana_demo1/app.yaml +++ b/2024/12/grafana_demo1/app.yaml @@ -1,10 +1,12 @@ version: '3.7' services: prometheus: + command: --config.file=/etc/prometheus/prometheus.yml --web.config.file=/etc/prometheus/prometheus.web.yml --storage.tsdb.path=/prometheus image: 'prom/prometheus' ports: - '9090:9090' volumes: + - 'prometheus-config:/etc/prometheus' - 'prometheus-data:/prometheus' networks: - net @@ -15,7 +17,7 @@ services: - '3000:3000' volumes: - 'grafana-storage:/var/lib/grafana' - - 'grafana-provisioning:/etc/grafana/provisioning' + - 'grafana_demo1_grafana-provisioning:/etc/grafana/provisioning' networks: - net @@ -24,7 +26,10 @@ networks: driver: bridge volumes: - grafana-provisioning: + grafana_demo1_grafana-provisioning: + external: + true grafana-storage: + prometheus-config: prometheus-data: diff --git a/2024/12/grafana_demo1/prometheus.web.yml b/2024/12/grafana_demo1/prometheus.web.yml new file mode 100644 index 0000000..70063b6 --- /dev/null +++ b/2024/12/grafana_demo1/prometheus.web.yml @@ -0,0 +1,2 @@ +auth_web_users: + admin: "<>" diff --git a/2024/12/grafana_demo1/datasources.yaml b/2024/12/grafana_demo1/prometheus.yml similarity index 100% rename from 2024/12/grafana_demo1/datasources.yaml rename to 2024/12/grafana_demo1/prometheus.yml diff --git a/2024/12/grafana_demo1/setup.yaml b/2024/12/grafana_demo1/setup.yaml index 998aec0..2aa93e9 100644 --- a/2024/12/grafana_demo1/setup.yaml +++ b/2024/12/grafana_demo1/setup.yaml @@ -3,6 +3,7 @@ services: prometheus: image: 'nginx' volumes: + - 'prometheus-config:/etc/prometheus' - 'prometheus-data:/prometheus' grafana: @@ -12,6 +13,7 @@ services: - 'grafana-provisioning:/etc/grafana/provisioning' volumes: + prometheus-config: grafana-provisioning: grafana-storage: prometheus-data: