Provides instrumentation that reports PMI data from WebSphere as metrics and/or custom events.
To use this instrumentation.
- Download the latest release.
- Edit newrelic.yml and disable websphere-jmx-7 instrumentation module in the agent (see below).
- In the New Relic Java Agent directory (directory containing newrelic.jar), create a directory named extensions if it doe not already exist.
- Copy the jars into the extensions directory.
- Restart the application.
-
Edit newrelic.yml
-
Find the following in newrelic.yml (note that not all of the enables below may be present.)
class_transformer:
com.newrelic.instrumentation.servlet-user:
enabled: false
com.newrelic.instrumentation.spring-aop-2:
enabled: false
# This instrumentation reports metrics for resultset operations.
com.newrelic.instrumentation.jdbc-resultset:
enabled: false -
Add the following lines after the above to disable websphere-jmx-7
com.newrelic.instrumentation.websphere-jmx-7:
enabled: false -
Save newrelic.yml
After install the extension, the collector will report enabled PMI values as per the configuration described below.
PMI metrics are named using the following
PMI/process_name/node_name/cell/wsname/stat_name
or if the process, node and cell are not defined the name is
PMI/wsname/stat_name
The collector can be configured to report enabled PMI values as metrics or custom events or both. It can also be disabled. All configuration values are dynamic so you can change them in newrelic.yml and the changes will take effect within a minute or so without restarting the application.
The PMICollector is configured in newrelic.yml.
There are five settings for the PMICollector.
Setting | Description | Value Type | Default |
---|---|---|---|
enabled | Whether collector is reporting data or not | true or false | true |
metrics_enabled | Whether collector is reporting data as metrics | true or false | false |
events_enabled | Whether to send PMI data as custom events | true or false | true |
stat_type_filter | Only report based on statType | comma separate list of stat types to report | no filter report all |
name_filter | Only report based on metric name or stat name | comma separate list of name to report | no filter report all |
debug | Enable detailed logging to agent log and custom events | true or false | false |
If custom events are enabled the following custom events are created and sent to New Relic.
Event Name | Description |
---|---|
PMIInitialization | Reports info related to the initialization of the Collector |
PMIEvent | Reports the values of a PMI statatic if enabled (default) |
Event Name | Description |
---|---|
ProcessStat | Reports info related to values used to name the metric |
In order to compile and create an update extension jar you need to have access to a WebSphere instance to get jars that are needed to compile.
If you make changes to the instrumentation code and need to build the instrumentation jars, follow these steps
- Set environment variable NEW_RELIC_EXTENSIONS_DIR. Its value should be the directory where you want to build the jars (i.e. the extensions directory of the Java Agent).
- Build one or all of the jars.
a. To build one jar, run the command: gradlew moduleName:clean moduleName:install
b. To build all jars, run the command: gradlew clean install - Restart the application
New Relic has open-sourced this project. This project is provided AS-IS WITHOUT WARRANTY OR DEDICATED SUPPORT. Issues and contributions should be reported to the project here on GitHub.
We encourage you to bring your experiences and questions to the Explorers Hub where our community members collaborate on solutions and new ideas.
We encourage your contributions to improve Salesforce Commerce Cloud for New Relic Browser! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at [email protected].
A note about vulnerabilities
As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.
If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.
New Relic Java Instrumentation for WebSphere PMI is licensed under the Apache 2.0 License.