WebLogic Application Server

See Set up Agents for information on installing the agent.

WebLogic 9 - WebLogic 12

Windows

Perform these steps to configure AppMon to diagnose applications on WebLogic 9 or 10 running on Windows using Java 1.5 or higher. WebLogic 12 using Java 7 is also supported.

  1. Extend the environment variable JAVA_OPTIONS to include the following: -agentpath:<DT_HOME>\agent\lib\\dtagent.dll=name=<AgentName>,server=<dynatraceCollectorName> where <DT_HOME> represents the AppMon installation directory.
  2. Modify JAVA_OPTIONS in the WebLogic startup script (startWebLogic.bat) as shown in the following. The example path shows an AppMon 64-bit installation.

@REM START WEBLOGIC

*set JAVA_OPTIONS={dtAgentString_win} %JAVA_OPTIONS%*

echo starting weblogic with Java version:

%JAVA_HOME%\bin\java %JAVA_VM% -version

if "%WLS_REDIRECT_LOG%"=="" (
echo Starting WLS with line:
echo %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% {color:blue}*%JAVA_OPTIONS%*{color}
     -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy
     %PROXY_SETTINGS% %SERVER_CLASS%
%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME%
     -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %PROXY_SETTINGS% %SERVER_CLASS%
) else (
echo Redirecting output from WLS window to %WLS_REDIRECT_LOG%
%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% {color:blue}*%JAVA_OPTIONS%*{color} -Dweblogic.Name=%SERVER_NAME%
     -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %PROXY_SETTINGS%
     %SERVER_CLASS% >"%WLS_REDIRECT_LOG%" 2>&1
)

*NIX

Perform the following steps to configure AppMon to diagnose applications on WebLogic 9 or 10 running on Linux using J2SE 5.0. WebLogic 12 using Java 7 is also supported.

  1. Extend the environment variable JAVA_OPTIONS as follows:
    JAVA_OPTIONS=-agentpath:<DT_HOME>/agent/lib/libdtagent.so=name=<AgentName>,server=<dynaTraceCollectorName>${JAVA_OPTIONS}.

  2. Modify JAVA_OPTIONS in the WebLogic startup script (startWebLogic.sh)as shown below.

*JAVA_OPTIONS={dtAgentString_unix} {env:JAVA_OPTIONS}"*

echo "starting weblogic with Java version:"

{env:JAVA_HOME}/bin/java {env:JAVA_VM} -version

if [ "{env:WLS_REDIRECT_LOG}" = "" ] ; then
    echo "Starting WLS with line:"
echo "{env:JAVA_HOME}/bin/java {env:JAVA_VM} {env:MEM_ARGS} {env:JAVA_OPTIONS} -Dweblogic.Name={env:SERVER_NAME}
          -Djava.security.policy={env:WL_HOME}/server/lib/weblogic.policy {env:PROXY_SETTINGS} {env:SERVER_CLASS}"

    {env:JAVA_HOME}/bin/java {env:JAVA_VM} {env:MEM_ARGS} {env:JAVA_OPTIONS} -Dweblogic.Name={env:SERVER_NAME}
          -Djava.security.policy={env:WL_HOME}/server/lib/weblogic.policy {env:PROXY_SETTINGS} {env:SERVER_CLASS}

else
    echo "Redirecting output from WLS window to {env:WLS_REDIRECT_LOG}"

    {env:JAVA_HOME}/bin/java {env:JAVA_VM} {env:MEM_ARGS} {env:JAVA_OPTIONS} -Dweblogic.Name={env:SERVER_NAME}
          -Djava.security.policy={env:WL_HOME}/server/lib/weblogic.policy {env:PROXY_SETTINGS}
          {env:SERVER_CLASS} 2>&1 >"{env:WLS_REDIRECT_LOG}"

fi

Alternatives for all supported Operating Systems

If using the browser-based Console or Node Manager to control your WebLogic instances, you have other configuration options. You can configure the Node Manager to use start scripts. According to Oracle documentation:

When you start Node Manager, it reads the nodemanager.properties file with the StartScriptEnabled=true property, and uses the start scripts when it subsequently starts Managed Servers. Note that you need to run the setNMProps script only once.

If you do not want to use start scripts, you can do the following, as illustrated by the figures below:

  1. Start your WebLogic Admin instance.
  2. Start the Administration Console by entering the <host>:<port>, for example localhost:7001.
  3. Through the Domain Structure pane, navigate to <base_domain> > Environment > Servers > <yourManagedServer>.
  4. In the Servers table on the Configuration tab in the Summary of Servers, select the server.
  5. In the Arguments field, enter the Add Tier wizard´s Agent string as in the following example, where WebLogic_easyTravel is an example for <technology_name>_<SystemProfileName> and [gfedora16vm:9998](http://gfedora16vm:9998)  is an example for <Collector or embedded_in_Server_Collector>:<port>.

[-agentpath:/home/user/dynatrace-]()7.0/agent/lib/[libdtagent.so](http://libdtagent.so)=name=WebLogic_easyTravel,server=gfedora16vm:9998

WebLogic Agent naming

For agents injected to WebLogic, the server name is appended in square brackets right after the agent name, where serverName is defined by command line argument -Dweblogic.Name.