diff --git a/devenv/datasources.yaml b/devenv/datasources.yaml index 2f352935c23..1bfa72b9ea2 100644 --- a/devenv/datasources.yaml +++ b/devenv/datasources.yaml @@ -56,11 +56,15 @@ datasources: type: prometheus access: proxy url: http://localhost:9090 + basicAuth: true #username: admin, password: admin + basicAuthUser: admin jsonData: manageAlerts: true alertmanagerUid: gdev-alertmanager prometheusType: Prometheus #Cortex | Mimir | Prometheus | Thanos prometheusVersion: 2.40.0 + secureJsonData: + basicAuthPassword: admin #https://grafana.com/docs/grafana/latest/administration/provisioning/#using-environment-variables - name: gdev-slow-prometheus uid: gdev-slow-prometheus-uid diff --git a/devenv/docker/blocks/prometheus/Dockerfile b/devenv/docker/blocks/prometheus/Dockerfile index ea9fc071e3c..a39b100a950 100644 --- a/devenv/docker/blocks/prometheus/Dockerfile +++ b/devenv/docker/blocks/prometheus/Dockerfile @@ -2,3 +2,4 @@ FROM prom/prometheus:latest ADD prometheus.yml /etc/prometheus/ ADD recording.yml /etc/prometheus/ ADD alert.yml /etc/prometheus/ +ADD web.yml /etc/prometheus/ diff --git a/devenv/docker/blocks/prometheus/docker-compose.yaml b/devenv/docker/blocks/prometheus/docker-compose.yaml index 33dda81b14c..416064bd196 100644 --- a/devenv/docker/blocks/prometheus/docker-compose.yaml +++ b/devenv/docker/blocks/prometheus/docker-compose.yaml @@ -10,6 +10,7 @@ --storage.tsdb.path=/prometheus --web.console.libraries=/usr/share/prometheus/console_libraries --web.console.templates=/usr/share/prometheus/consoles + --web.config.file=/etc/prometheus/web.yml node_exporter: image: prom/node-exporter diff --git a/devenv/docker/blocks/prometheus/web.yml b/devenv/docker/blocks/prometheus/web.yml new file mode 100644 index 00000000000..bd98482e0f7 --- /dev/null +++ b/devenv/docker/blocks/prometheus/web.yml @@ -0,0 +1,3 @@ +basic_auth_users: + # username: admin, password: admin + admin: $2a$12$HvzPxejEHakuEIjxQ8uQrOaZ57GmFznB6M/w.85MpdEtSFFOOyDgW