Instrument Oracle WebLogic for Linux

  1. Edit startWebLogic.sh located at <weblogic_<version#>_install_dir>/user_projects/domains/<domain_name>/bin/startWebLogic.sh.
  2. Add the following to the beginning of your application server start script:
    export JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:/agent_home/javaagent.jar"
    • The javaagent argument must reference the full path of the agent installation directory.
    • The export command precedes the WebLogic start commands, for example:
      #Enable the Java Agent
      export JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:/opt/AppDynamics/AppServerAgent/javaagent.jar"
      # START WEBLOGIC
      echo "starting weblogic with Java version:"
      ${JAVA_HOME}/bin/java ${JAVA_VM} -version
  3. Restart the application server for the changes to take effect.