Skip to content

Commit

Permalink
feat: add env variable to set log-level
Browse files Browse the repository at this point in the history
  • Loading branch information
hbollon committed Sep 18, 2023
1 parent 69788ca commit cf45a56
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ envsubst < config.yml > /etc/blackbox_exporter/config.yml
rm -f /etc/blackbox_exporter/config_web.yml || :
envsubst < config_web.yml > /etc/blackbox_exporter/config_web.yml

/bin/blackbox_exporter --config.file=/etc/blackbox_exporter/config.yml --web.config.file=/etc/blackbox_exporter/config_web.yml
if [[ -z "${APP_LOG_LEVEL}" ]]; then
LOG_LEVEL="info"
else
LOG_LEVEL="${APP_LOG_LEVEL}"
fi

/bin/blackbox_exporter --log.level=${LOG_LEVEL} --config.file=/etc/blackbox_exporter/config.yml --web.config.file=/etc/blackbox_exporter/config_web.yml

0 comments on commit cf45a56

Please sign in to comment.