feat: Add basic auth on Prometheus
This commit is contained in:
parent
414eb2e584
commit
794ff3abd0
3
monitoring/.gitignore
vendored
3
monitoring/.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
prometheus.yml
|
prometheus.yml
|
||||||
|
web.yml
|
||||||
@ -5,5 +5,6 @@
|
|||||||
```bash
|
```bash
|
||||||
cp .env.example .env # then edit
|
cp .env.example .env # then edit
|
||||||
cp prometheus.example.yml prometheus.yml # then edit
|
cp prometheus.example.yml prometheus.yml # then edit
|
||||||
|
cp web.example.yml web.yml # then edit
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|||||||
@ -38,9 +38,11 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||||
|
- ./web.yml:/etc/prometheus/web.yml
|
||||||
- prometheus-data:/prometheus
|
- prometheus-data:/prometheus
|
||||||
command:
|
command:
|
||||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||||
|
- '--web.config.file=/etc/prometheus/web.yml'
|
||||||
- '--storage.tsdb.path=/prometheus'
|
- '--storage.tsdb.path=/prometheus'
|
||||||
- '--storage.tsdb.retention.time=365d'
|
- '--storage.tsdb.retention.time=365d'
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
2
monitoring/web.example.yml
Normal file
2
monitoring/web.example.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
basic_auth_users:
|
||||||
|
admin: $2b$12$hNf2lSsxfm0.i4a.1kVpSOVyBCfIB51VRjgBUyv6kdnyTlgWj81Ay # test
|
||||||
Loading…
x
Reference in New Issue
Block a user