WebLogic installation for Java

These directions for WebLogic supplement the Java installation directions:

The Java agent must be installed manually for WebLogic. There is no self installer.

Linux and Mac installation

To install New Relic Java for WebLogic on Linux or Mac OS X:

  1. Find the file startWebLogic.sh in the domain's bin folder:

    /path/to/appserver/userprojects/domains/base_domain/bin
  2. Add the following entry (add before Java executes):

    export JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:/path/to/newrelic.jar"

Windows installation

To install New Relic Java for WebLogic on Windows:

  1. Find the file startWebLogic.bat in the domain's bin folder:

    C:\Oracle\Middleware\userprojects\domains\base_domain\bin\
  2. Add the following entry near the beginning of the file:

    set JAVA_OPTIONS=%JAVA_OPTIONS% -javaagent:"C:\path\to\newrelic.jar"

Administration console installation

To instrument managed server instances started and stopped through the Node Manager, use the administration console. For administration server instances, follow the Linux and Mac or Windows installation instructions. You can not use the administration console to install administration server instances.

To instrument managed server instances:

  1. From the administration console, navigate to Environments > Servers > (select your server) > Server Start > Arguments.

    screen-admin-console-weblogic-server-start
    Administration Console > Environments: Select Servers to configure your server.
  2. Add the following entry under Arguments and save the page:

    -javaagent:/path/to/newrelic.jar
    screen-admin-console-weblogic-add-arguments
    Environments > Servers > (select your server) > Server Start > Arguments: To instrument your managed server instance, add -javaagent:/path/to/newrelic.jar to the Arguments field.
  3. After saving your changes, restart your server instance.

Java 2 security

If you are using Java 2 security, add the following entry to weblogic.policy to complete installation:

grant codeBase "file:/path/to/directory/newrelic/-" {
  permission java.security.AllPermission;
};

Specify the directory containing newrelic.jar in /path/to/directory/newrelic. The default policy file location is weblogic_root/server/lib/weblogic.policy.

Using browser monitoring

WebLogic users must use manual instrumentation for page load timing (also known as real user monitoring or RUM). Auto instrumentation is not available for WebLogic.

Collecting JMX metrics

You can also collect JMX metrics, and view them from the JVM metrics page. In WebLogic, JMX is enabled by default. New Relic collects the following mbeans metrics:

To collect additional JMX metrics, use a custom YAML file.

ThreadCount
Attribute ThreadCount
Object name pattern
java.lang:type=Threading
New Relic metric
JmxBuiltIn/Threads/Thread Count
Type Simple
TotalStartedThreadCount
Attribute TotalStartedThreadCount
Object name pattern
java.lang:type=Threading
New Relic metric
JmxBuiltIn/Threads/TotalStartedCount
Type Simple
LoadedClassCount
Attribute LoadedClassCount
Object name pattern
java.lang:type=ClassLoading
New Relic metric
JmxBuiltIn/Classes/Loaded
Type Simple
UnloadedClassCount
Attribute UnloadedClassCount
Object name pattern
java.lang:type=ClassLoading
New Relic metric
JmxBuiltIn/Classes/Unloaded
Type Simple
HoggingThreadCount
Attribute HoggingThreadCount
Object name pattern
com.bea:ServerRuntime=*,Name=ThreadPoolRuntime,Type=ThreadPoolRuntime
New Relic metric
JmxBuiltIn/ThreadPool/{Name}/Active
Type Simple
ExecuteThreadIdleCount
Attribute ExecuteThreadIdleCount
Object name pattern
com.bea:ServerRuntime=*,Name=ThreadPoolRuntime,Type=ThreadPoolRuntime
New Relic metric
JmxBuiltIn/ThreadPool/{Name}/Idle
Type Simple
StandbyThreadCount
Attribute StandbyThreadCount
Object name pattern
com.bea:ServerRuntime=*,Name=ThreadPoolRuntime,Type=ThreadPoolRuntime
New Relic metric
JmxBuiltIn/ThreadPool/{Name}/Standby
Type Simple
TransactionTotalCount
Attribute TransactionTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=JTARuntime,Type=JTARuntime
New Relic metric
JmxBuiltIn/JTA/{Name}/Count
Type Monotonic
TransactionCommittedTotalCount
Attribute TransactionCommittedTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=JTARuntime,Type=JTARuntime
New Relic metric
JmxBuiltIn/JTA/{Name}/Committed
Type Monotonic
TransactionRolledBackTotalCount
Attribute TransactionRolledBackTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=JTARuntime,Type=JTARuntime
New Relic metric
JmxBuiltIn/JTA/{Name}/Rolled Back
Type Monotonic
TransactionAbandonedTotalCount
Attribute TransactionAbandonedTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=JTARuntime,Type=JTARuntime
New Relic metric
JmxBuiltIn/JTA/{Name}/Abandoned
Type Monotonic
NumAvailable
Attribute NumAvailable
Object name pattern
com.bea:ServerRuntime=*,Name=*,Type=JDBCDataSourceRuntime
New Relic metric
JmxBuiltIn/DataSources/{Name}/Connections/Available
Type Simple
CurrCapacity
Attribute CurrCapacity
Object name pattern
com.bea:ServerRuntime=*,Name=*,Type=JDBCDataSourceRuntime
New Relic metric
JmxBuiltIn/DataSources/{Name}/Connections/PoolSize
Type Simple
ConnectionsTotalCount
Attribute ConnectionsTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,Type=JDBCDataSourceRuntime
New Relic metric
JmxBuiltIn/DataSources/{Name}/Connections/Created
Type Monotonic
ActiveConnectionsCurrentCount
Attribute ActiveConnectionsCurrentCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,Type=JDBCDataSourceRuntime
New Relic metric
JmxBuiltIn/DataSources/{Name}/Connections/Active
Type Simple
LeakedConnectionCount
Attribute LeakedConnectionCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,Type=JDBCDataSourceRuntime
New Relic metric
JmxBuiltIn/DataSources/{Name}/Connections/Leaked
Type Monotonic
PrepStmtCacheCurrentSize
Attribute PrepStmtCacheCurrentSize
Object name pattern
com.bea:ServerRuntime=*,Name=*,Type=JDBCDataSourceRuntime
New Relic metric
JmxBuiltIn/DataSources/{Name}/Statement Cache/Size
Type Simple
WaitingForConnectionCurrentCount
Attribute WaitingForConnectionCurrentCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,Type=JDBCDataSourceRuntime
New Relic metric
JmxBuiltIn/DataSources/{Name}/Requests/Currently Waiting
Type Simple
WaitingForConnectionTotal
Attribute WaitingForConnectionTotal
Object name pattern
com.bea:ServerRuntime=*,Name=*,Type=JDBCDataSourceRuntime
New Relic metric
JmxBuiltIn/DataSources/{Name}/Requests/Count
Type Monotonic
WaitingForConnectionSuccessTotal
Attribute WaitingForConnectionSuccessTotal
Object name pattern
com.bea:ServerRuntime=*,Name=*,Type=JDBCDataSourceRuntime
New Relic metric
JmxBuiltIn/DataSources/{Name}/Requests/Successful
Type Monotonic
WaitingForConnectionFailureTotal
Attribute WaitingForConnectionFailureTotal
Object name pattern
com.bea:ServerRuntime=*,Name=*,Type=JDBCDataSourceRuntime
New Relic metric
JmxBuiltIn/DataSources/{Name}/Requests/Failed
Type Monotonic
AccessTotalCount - MissTotalCount
Attribute AccessTotalCount - MissTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,ApplicationRuntime=*,Type=EJBPoolRuntime,EJBComponentRuntime=*,*
New Relic metric
JmxBuiltIn/EJB/Pool/Bean/{ApplicationRuntime}/{EJBComponentRuntime}/{Name}/Attempts/Successful
Type Monotonic
MissTotalCount
Attribute MissTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,ApplicationRuntime=*,Type=EJBPoolRuntime,EJBComponentRuntime=*,*
New Relic metric
JmxBuiltIn/EJB/Pool/Bean/{ApplicationRuntime}/{EJBComponentRuntime}/{Name}/Attempts/Failed
Type Monotonic
WaiterCurrentCount
Attribute WaiterCurrentCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,ApplicationRuntime=*,Type=EJBPoolRuntime,EJBComponentRuntime=*,*
New Relic metric
JmxBuiltIn/EJB/Pool/Bean/{ApplicationRuntime}/{EJBComponentRuntime}/{Name}/Threads/Waiting
Type Simple
DestroyedTotalCount
Attribute DestroyedTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,ApplicationRuntime=*,Type=EJBPoolRuntime,EJBComponentRuntime=*,*
New Relic metric
JmxBuiltIn/EJB/Pool/Bean/{ApplicationRuntime}/{EJBComponentRuntime}/{Name}/Beans/Destroyed
Type Monotonic
BeansInUseCurrentCount
Attribute BeansInUseCurrentCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,ApplicationRuntime=*,Type=EJBPoolRuntime,EJBComponentRuntime=*,*
New Relic metric
JmxBuiltIn/EJB/Pool/Bean/{ApplicationRuntime}/{EJBComponentRuntime}/{Name}/Beans/Active
Type Simple
PooledBeansCurrentCount
Attribute PooledBeansCurrentCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,ApplicationRuntime=*,Type=EJBPoolRuntime,EJBComponentRuntime=*,*
New Relic metric
JmxBuiltIn/EJB/Pool/Bean/{ApplicationRuntime}/{EJBComponentRuntime}/{Name}/Beans/Available
Type Simple
TransactionsCommittedTotalCount +TransactionsRolledBackTotalCount +TransactionsTimedOutTotalCount
Attribute TransactionsCommittedTotalCount +TransactionsRolledBackTotalCount +TransactionsTimedOutTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,ApplicationRuntime=*,Type=EJBTransactionRuntime,EJBComponentRuntime=*,*
New Relic metric
JmxBuiltIn/EJB/Transactions/Application/{ApplicationRuntime}/Count
Type Monotonic
TransactionsCommittedTotalCount
Attribute TransactionsCommittedTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,ApplicationRuntime=*,Type=EJBTransactionRuntime,EJBComponentRuntime=*,*
New Relic metric
JmxBuiltIn/EJB/Transactions/Application/{ApplicationRuntime}/Committed
Type Monotonic
TransactionsRolledBackTotalCount
Attribute TransactionsRolledBackTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,ApplicationRuntime=*,Type=EJBTransactionRuntime,EJBComponentRuntime=*,*
New Relic metric
JmxBuiltIn/EJB/Transactions/Application/{ApplicationRuntime}/Rolled Back
Type Monotonic
TransactionsTimedOutTotalCount
Attribute TransactionsTimedOutTotalCount
Object name pattern
com.bea:ServerRuntime=*,Name=*,ApplicationRuntime=*,Type=EJBTransactionRuntime,EJBComponentRuntime=*,*
New Relic metric
JmxBuiltIn/EJB/Transactions/Application/{ApplicationRuntime}/Timed Out
Type Monotonic

For more help

Additional documentation resources include:

Join the discussion about Java monitoring in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.