Skip to content

Commit

Permalink
Display more debug output during initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlemke committed Aug 31, 2022
1 parent 5005e7f commit a9f4dbc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion root-files/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ banner_flownative Promtail
eval "$(promtail_env)"
eval "$(supervisor_env)"

# promtail_initialize
promtail_initialize

supervisor_initialize
supervisor_start
Expand Down
16 changes: 16 additions & 0 deletions root-files/opt/flownative/lib/promtail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,20 @@ EOF
#
promtail_initialize() {
info "Promtail: Initializing ..."

info "Will scrape logs found at ${PROMTAIL_SCRAPE_PATH}"

path=$(dirname ${PROMTAIL_SCRAPE_PATH})
if [ ! -d $path ]; then
warn "$path does not exist"
fi

info "Logs will be sent to ${PROMTAIL_CLIENT_URL}"

if [[ $PROMTAIL_BASIC_AUTH_USERNAME != "" && $PROMTAIL_BASIC_AUTH_PASSWORD != "" ]]; then
info "Will authenticate with username ${PROMTAIL_BASIC_AUTH_USERNAME} and a given password"
fi
if [[ $PROMTAIL_BASIC_AUTH_USERNAME != "" && $PROMTAIL_BASIC_AUTH_PASSWORD == "" ]]; then
warn "Authentication is configured to use username ${PROMTAIL_BASIC_AUTH_USERNAME} but no password was specified!"
fi
}

0 comments on commit a9f4dbc

Please sign in to comment.