Skip to content

Commit

Permalink
grafana dashboard and env variables should work in all deployment modes
Browse files Browse the repository at this point in the history
  • Loading branch information
cdpop committed Nov 26, 2024
1 parent 0754ee6 commit d226b77
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
12 changes: 10 additions & 2 deletions flink/flink_session_mode/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
# loading env variables
source ${DIR}/../../scripts/utils.sh

profile_grafana_command=""
if [ -z "$ENABLE_JMX_GRAFANA" ]
then
log "🛑 Grafana is disabled"
else
log "📊 Grafana is enabled"
profile_grafana_command="--profile grafana"
playground state set flags.ENABLE_JMX_GRAFANA 1
fi

source ${DIR}/../../scripts/flink_download_connectors.sh

docker compose --profile grafana up -d
docker compose ${profile_grafana_command} up -d
12 changes: 11 additions & 1 deletion flink/flink_session_mode/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"

source ${DIR}/../../scripts/utils.sh

docker-compose --profile grafana down -v --remove-orphans
profile_grafana_command=""
if [ -z "$ENABLE_JMX_GRAFANA" ]
then
log "🛑 Grafana is disabled"
else
log "📊 Grafana is enabled"
profile_grafana_command="--profile grafana"
playground state set flags.ENABLE_JMX_GRAFANA 1
fi

docker-compose ${profile_grafana_command} down -v --remove-orphans

stop_all "$DIR"

0 comments on commit d226b77

Please sign in to comment.