feat: Add basic auth on Prometheus
This commit is contained in:
parent
414eb2e584
commit
794ff3abd0
1
monitoring/.gitignore
vendored
1
monitoring/.gitignore
vendored
@ -1 +1,2 @@
|
||||
prometheus.yml
|
||||
web.yml
|
||||
@ -5,5 +5,6 @@
|
||||
```bash
|
||||
cp .env.example .env # then edit
|
||||
cp prometheus.example.yml prometheus.yml # then edit
|
||||
cp web.example.yml web.yml # then edit
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
@ -38,9 +38,11 @@ services:
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- ./web.yml:/etc/prometheus/web.yml
|
||||
- prometheus-data:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--web.config.file=/etc/prometheus/web.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--storage.tsdb.retention.time=365d'
|
||||
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