mirror of
https://github.com/bigbluebutton/docker.git
synced 2025-02-24 13:41:21 +01:00
Merge pull request #161 from omidmaldar-lms/prometheus-exporter-optimization
Enable optimization for Prometheus Exporter when recording is enabled
This commit is contained in:
commit
11bbe94985
@ -394,11 +394,16 @@ services:
|
||||
environment:
|
||||
API_BASE_URL: http://10.7.7.1:8080/bigbluebutton/api/
|
||||
API_SECRET: ${SHARED_SECRET}
|
||||
RECORDINGS_METRICS_READ_FROM_DISK: "false"
|
||||
RECORDINGS_METRICS_READ_FROM_DISK: "${ENABLE_PROMETHEUS_EXPORTER_OPTIMIZATION:-false}"
|
||||
networks:
|
||||
bbb-net:
|
||||
ipv4_address: 10.7.7.33
|
||||
{{ if isTrue .Env.ENABLE_PROMETHEUS_EXPORTER_OPTIMIZATION }}
|
||||
volumes:
|
||||
- bigbluebutton:/var/bigbluebutton:ro
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
|
||||
volumes:
|
||||
bigbluebutton:
|
||||
|
@ -26,6 +26,7 @@ ENABLE_GREENLIGHT=true
|
||||
# serves the bigbluebutton-exporter under following URL:
|
||||
# https://yourdomain/bbb-exporter
|
||||
#ENABLE_PROMETHEUS_EXPORTER=true
|
||||
#ENABLE_PROMETHEUS_EXPORTER_OPTIMIZATION=true
|
||||
|
||||
# Recording
|
||||
# IMPORTANT: this is currently a big privacy issues, because it will
|
||||
|
@ -45,6 +45,7 @@ docker run \
|
||||
-e ENABLE_COTURN=${ENABLE_COTURN:-false} \
|
||||
-e ENABLE_GREENLIGHT=${ENABLE_GREENLIGHT:-false} \
|
||||
-e ENABLE_PROMETHEUS_EXPORTER=${ENABLE_PROMETHEUS_EXPORTER:-false} \
|
||||
-e ENABLE_PROMETHEUS_EXPORTER_OPTIMIZATION=${ENABLE_PROMETHEUS_EXPORTER_OPTIMIZATION:-false} \
|
||||
-e NUMBER_OF_BACKEND_NODEJS_PROCESSES=${NUMBER_OF_BACKEND_NODEJS_PROCESSES:-1} \
|
||||
-e NUMBER_OF_FRONTEND_NODEJS_PROCESSES=${NUMBER_OF_FRONTEND_NODEJS_PROCESSES:-1} \
|
||||
jwilder/dockerize -template /docker-compose.tmpl.yml \
|
||||
|
@ -50,11 +50,6 @@ then
|
||||
done
|
||||
fi
|
||||
|
||||
prometheus_exporter=""
|
||||
while [[ ! $prometheus_exporter =~ ^(y|n)$ ]]; do
|
||||
read -p "Should a Prometheus exporter be included? (y/n): " prometheus_exporter
|
||||
done
|
||||
|
||||
DOMAIN=""
|
||||
while [[ -z "$DOMAIN" ]]; do
|
||||
read -p "Please enter the domain name: " DOMAIN
|
||||
@ -68,10 +63,23 @@ echo " suggests, that it does not."
|
||||
echo " make sure that you always get people's consent, before they join a room!"
|
||||
echo " https://github.com/bigbluebutton/bigbluebutton/issues/9202"
|
||||
while [[ ! $recording =~ ^(y|n)$ ]]; do
|
||||
|
||||
read -p "Choice (y/n): " recording
|
||||
done
|
||||
|
||||
prometheus_exporter=""
|
||||
while [[ ! $prometheus_exporter =~ ^(y|n)$ ]]; do
|
||||
read -p "Should a Prometheus exporter be included? (y/n): " prometheus_exporter
|
||||
done
|
||||
if [ "$prometheus_exporter" == "y" ] && [ "$recording" == "y" ]
|
||||
then
|
||||
echo "Should Prometheus exporter optimization be enabled?"
|
||||
echo " This instructs exporter to collect expensive recordings metrics by querying the disk instead of the API."
|
||||
echo " Enabling this can substantially decrease the scrape time required for the exporter to respond to metrics requests"
|
||||
prometheus_exporter_optimization=""
|
||||
while [[ ! $prometheus_exporter_optimization =~ ^(y|n)$ ]]; do
|
||||
read -p "Choice (y/n): " prometheus_exporter_optimization
|
||||
done
|
||||
|
||||
if [ "$recording" == "y" ]
|
||||
then
|
||||
|
||||
@ -166,7 +174,12 @@ fi
|
||||
|
||||
if [ "$prometheus_exporter" == "y" ]
|
||||
then
|
||||
sed -i "s/#ENABLE_PROMETHEUS_EXPORTER.*/ENABLE_PROMETHEUS_EXPORTER=true/" .env
|
||||
sed -i "s/#ENABLE_PROMETHEUS_EXPORTER=.*/ENABLE_PROMETHEUS_EXPORTER=true/" .env
|
||||
fi
|
||||
|
||||
if [ "$prometheus_exporter_optimization" == "y" ]
|
||||
then
|
||||
sed -i "s/#ENABLE_PROMETHEUS_EXPORTER_OPTIMIZATION=.*/ENABLE_PROMETHEUS_EXPORTER_OPTIMIZATION=true/" .env
|
||||
fi
|
||||
|
||||
# change secrets
|
||||
|
Loading…
Reference in New Issue
Block a user