mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2026-02-17 19:31:07 +00:00
Fix the rules for postgres_exporter. Change to the prometheus version.
parent
9687331902
commit
749cb57b05
@ -29,15 +29,12 @@ services:
|
|||||||
|
|
||||||
# postgres
|
# postgres
|
||||||
postgres-exporter:
|
postgres-exporter:
|
||||||
image: wrouesnel/postgres_exporter:v0.8.0
|
image: quay.io/prometheuscommunity/postgres-exporter:latest
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
env_file: env/postgres.env
|
env_file: env/pg_exporter.env
|
||||||
environment:
|
environment:
|
||||||
DATA_SOURCE_URI: postgres?sslmode=disable
|
DATA_SOURCE_URI: postgres?sslmode=disable
|
||||||
DATA_SOURCE_USER: $${POSTGRES_USER}
|
|
||||||
DATA_SOURCE_PASS: $${POSTGRES_PASSWORD}
|
|
||||||
PG_EXPORTER_AUTO_DISCOVER_DATABASES: 'true'
|
|
||||||
|
|
||||||
# redis
|
# redis
|
||||||
redis-worker-exporter:
|
redis-worker-exporter:
|
||||||
@ -120,8 +117,11 @@ scrape_configs:
|
|||||||
- targets: ['grafana:3000']
|
- targets: ['grafana:3000']
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, create env/grafana.env. You will need to know the ADMIN PASSWORD to login to grafana, but it will be changed on first login.
|
Finally, create env/grafana.env and env/pg_exporter.env. You will need to know the GF_SECURITY_ADMIN_PASSWORD to login to grafana, but it will be changed on first login.
|
||||||
|
|
||||||
|
source env/postgres.env
|
||||||
|
echo "DATA_SOURCE_USER=$POSTGRES_USER" > env/pg_exporter.env
|
||||||
|
echo "DATA_SOURCE_PASS=$POSTGRES_PASSWORD" >> env/pg_exporter.env
|
||||||
echo "GF_SECURITY_SECRET_KEY=$(openssl rand -base64 32)" > env/grafana.env
|
echo "GF_SECURITY_SECRET_KEY=$(openssl rand -base64 32)" > env/grafana.env
|
||||||
echo "GF_SECURITY_ADMIN_PASSWORD=$(openssl rand -hex 5)" | tee -a env/grafana.env
|
echo "GF_SECURITY_ADMIN_PASSWORD=$(openssl rand -hex 5)" | tee -a env/grafana.env
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user