Skip to content

Commit

Permalink
Expose ssl configuration (#1346)
Browse files Browse the repository at this point in the history
  • Loading branch information
vickenty authored Jan 8, 2025
1 parent 86ca81e commit 227a9cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/datadog/apps/jmxfetch/images/jmx-test-app/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -f
[ -n "$JAVA_OPTS" ] || JAVA_OPTS="-Xmx128M -Xms128M"
[ -n "$RMI_PORT" ] || RMI_PORT="9010"
[ -n "$HOST_NAME" ] || HOST_NAME=`awk 'END{print $1}' /etc/hosts`
[ -n "$SSL_MODE"] || SSL_MODE="false"

echo "Using `java --version`"
echo "With JAVA_OPTS '${JAVA_OPTS}'"
Expand All @@ -13,14 +14,16 @@ javac -d app SimpleApp.java

echo "Starting app with hostname set to ${HOST_NAME}"
echo "RMI port is set to ${RMI_PORT}"
echo "SSL: ${SSL_MODE}"

java -cp ./app \
${JAVA_OPTS} \
-Dcom.sun.management.jmxremote=true \
-Dcom.sun.management.jmxremote.port=${RMI_PORT} \
-Dcom.sun.management.jmxremote.rmi.port=${RMI_PORT} \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.ssl=${SSL_MODE} \
-Dcom.sun.management.jmxremote.registry.ssl=${SSL_MODE} \
-Djava.rmi.server.hostname=${HOST_NAME} \
SimpleApp

Expand Down

0 comments on commit 227a9cb

Please sign in to comment.