Skip to content

Commit

Permalink
jmx functional with JAVA_RMI_SERVER_HOSTNAME
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-willm committed Jun 28, 2024
1 parent c7f8ea8 commit 5c886aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ CSP_ENFORCE="${CSP_ENFORCE:-}"

# for ecs/datadog, optionally enable APM and JMX metrics
DD_COLLECT_APM="${DD_COLLECT_APM:-false}"
JAVA_RMI_SERVER_HOSTNAME="${JAVA_RMI_SERVER_HOSTNAME:-}"

SLEEP="${SLEEP:=0}"

Expand Down Expand Up @@ -246,15 +247,14 @@ main() {
echo "Adding -javaagent and jmx settings to java command"
export DD_JAVA_AGENT="-javaagent:./datadog/dd-java-agent.jar -Ddd.profiling.enabled=true -Ddd.logs.injection=true -XX:FlightRecorderOptions=stackdepth=256"

# export $CONTAINER_PRIVATE_IP=$(hostname -i)
export DD_JMX="-Dspring.jmx.enabled=true \
-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.local.only=false \
-Dcom.sun.management.jmxremote.port=7199 \
-Dcom.sun.management.jmxremote.rmi.port=7199 \
-Djava.rmi.server.hostname=typea-live-jmx.lkpoc.labkey.com"
-Djava.rmi.server.hostname=${JAVA_RMI_SERVER_HOSTNAME}"
fi

echo "Purging secrets and other bits from environment variables..."
Expand Down

0 comments on commit 5c886aa

Please sign in to comment.