Monitoring with New Relic
Last modified: August 27, 2024
Introduction
When setting up a Mendix application on premises, you can set up advanced monitoring with New Relic. This works with both Windows and Linux deployments. It is not supported in Mendix Cloud.
Prerequisites
Before starting this how-to, make sure you have completed the following prerequisites:
- Set up a trial account with New Relic.
- Follow the steps in Install the Java Agent.
- As noted in step 2, unzip the newrelic.zip file into a directory that the user of the Mendix process has access to (meaning, the user home directory).
- Check the newrelic.yml file in the unzipped directory, and make sure you read through the settings and understand the security implications.
- Follow the Linux- or Windows-specific steps below to complete the installation.
Linux-Specific Steps
Add -javaagent:/PATH/TO/NEWRELIC.JAR
to your Java options in the m2ee.yaml file. Make sure to replace the path to the actual path of the newrelic.jar.
The configuration section in m2ee.yaml should look like this:
javaopts: [
"-Dfile.encoding=UTF-8", "-Xmx256M", "-Xms256M",
"-Djava.io.tmpdir=/path/to/project/data/tmp",
"-javaagent:/home/mendix-user/newrelic/newrelic.jar",
]
Windows-Specific Steps
Add -javaagent:/PATH/TO/NEWRELIC.JAR
to your Java arguments in the Windows Service Console:
After you restart the application, your data should show up in New Relic. This requires the application to send data to New Relic servers, so your firewalls should be configured to allow for this traffic.
Read More
- Finding the Root Cause of Runtime Errors
- Clearing Warning Messages in Mendix
- Testing Web Services Using SoapUI
- New Relic in the cf-mendix-buildpack repo on GitHub