Merge pull request #5915 from gsiv/dev/prom
Docker: Improve Prometheus integration
This commit is contained in:
commit
5cee662058
@ -13,5 +13,7 @@ import endpoint
|
|||||||
|
|
||||||
reverse_proxy /media/* media:8000
|
reverse_proxy /media/* media:8000
|
||||||
|
|
||||||
|
reverse_proxy /prometheus/* prometheus:9090
|
||||||
|
|
||||||
reverse_proxy client:4200
|
reverse_proxy client:4200
|
||||||
}
|
}
|
||||||
|
@ -96,3 +96,10 @@ SERVER_SETUP_PORT=
|
|||||||
DJANGO_LOG_LEVEL=
|
DJANGO_LOG_LEVEL=
|
||||||
OPENSLIDES_LOG_LEVEL=
|
OPENSLIDES_LOG_LEVEL=
|
||||||
RESET_PASSWORD_VERBOSE_ERRORS=
|
RESET_PASSWORD_VERBOSE_ERRORS=
|
||||||
|
|
||||||
|
# Optional services
|
||||||
|
# -----------------
|
||||||
|
# If enabled, Prometheus will be accessible at /prometheus/ without any
|
||||||
|
# built-in access controls! Please make sure to use it in a controlled
|
||||||
|
# development environment or to set up access controls independently.
|
||||||
|
PROMETHEUS_ENABLED=
|
||||||
|
@ -8,6 +8,7 @@ TARGETS=(
|
|||||||
[server]="$(dirname "${BASH_SOURCE[0]}")/../server/docker/"
|
[server]="$(dirname "${BASH_SOURCE[0]}")/../server/docker/"
|
||||||
[proxy]="$(dirname "${BASH_SOURCE[0]}")/../caddy/"
|
[proxy]="$(dirname "${BASH_SOURCE[0]}")/../caddy/"
|
||||||
[autoupdate]="$(dirname "${BASH_SOURCE[0]}")/../autoupdate/"
|
[autoupdate]="$(dirname "${BASH_SOURCE[0]}")/../autoupdate/"
|
||||||
|
[prometheus]="$(dirname "${BASH_SOURCE[0]}")/../prometheus/"
|
||||||
[media]="https://github.com/OpenSlides/openslides-media-service.git"
|
[media]="https://github.com/OpenSlides/openslides-media-service.git"
|
||||||
[pgbouncer]="https://github.com/OpenSlides/openslides-docker-compose.git#:pgbouncer"
|
[pgbouncer]="https://github.com/OpenSlides/openslides-docker-compose.git#:pgbouncer"
|
||||||
[postfix]="https://github.com/OpenSlides/openslides-docker-compose.git#:postfix"
|
[postfix]="https://github.com/OpenSlides/openslides-docker-compose.git#:postfix"
|
||||||
|
@ -239,6 +239,11 @@ ifelse(read_env(`PGNODE_3_ENABLED'), 1, `'
|
|||||||
# Override command to run more workers per task
|
# Override command to run more workers per task
|
||||||
# command: ["gunicorn", "-w", "4", "--preload", "-b",
|
# command: ["gunicorn", "-w", "4", "--preload", "-b",
|
||||||
# "0.0.0.0:8000", "src.mediaserver:app"]
|
# "0.0.0.0:8000", "src.mediaserver:app"]
|
||||||
|
ifelse(read_env(`PROMETHEUS_ENABLED'), 1, `'
|
||||||
|
prometheus:
|
||||||
|
image: ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/openslides-prometheus:latest
|
||||||
|
networks:
|
||||||
|
- back)
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
dbdata1:
|
dbdata1:
|
||||||
|
@ -266,6 +266,11 @@ ifelse(read_env(`PGNODE_3_ENABLED'), 1, `'
|
|||||||
# Override command to run more workers per task
|
# Override command to run more workers per task
|
||||||
# command: ["gunicorn", "-w", "4", "--preload", "-b",
|
# command: ["gunicorn", "-w", "4", "--preload", "-b",
|
||||||
# "0.0.0.0:8000", "src.mediaserver:app"]
|
# "0.0.0.0:8000", "src.mediaserver:app"]
|
||||||
|
ifelse(read_env(`PROMETHEUS_ENABLED'), 1, `'
|
||||||
|
prometheus:
|
||||||
|
image: ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/openslides-prometheus:latest
|
||||||
|
networks:
|
||||||
|
- back)
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
dbdata1:
|
dbdata1:
|
||||||
|
9
prometheus/Dockerfile
Normal file
9
prometheus/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM prom/prometheus:v2.24.0
|
||||||
|
|
||||||
|
ADD prometheus.yml /etc/prometheus/
|
||||||
|
|
||||||
|
CMD [ "--config.file=/etc/prometheus/prometheus.yml", \
|
||||||
|
"--storage.tsdb.path=/prometheus", \
|
||||||
|
"--web.console.libraries=/usr/share/prometheus/console_libraries", \
|
||||||
|
"--web.console.templates=/usr/share/prometheus/consoles", \
|
||||||
|
"--web.external-url=http://localhost:9090/prometheus" ]
|
8
prometheus/prometheus.yml
Normal file
8
prometheus/prometheus.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
global:
|
||||||
|
evaluation_interval: 15s
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: openslides3-autoupdate
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- autoupdate:8002
|
Loading…
Reference in New Issue
Block a user