Monitoring with New Relic

Last modified: February 19, 2024

1 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.

2 Prerequisites

Before starting this how-to, make sure you have completed the following prerequisites:

  1. Set up a trial account with New Relic.
  2. Follow the steps in Install the Java Agent.
  3. 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).
  4. Check the newrelic.yml file in the unzipped directory, and make sure you read through the settings and understand the security implications.
  5. Follow the Linux- or Windows-specific steps below to complete the installation.

3 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:

1
2
3
4
5
 javaopts: [
 "-Dfile.encoding=UTF-8", "-Xmx256M", "-Xms256M",
 "-Djava.io.tmpdir=/path/to/project/data/tmp",
 "-javaagent:/home/mendix-user/newrelic/newrelic.jar",
 ]

4 Windows-Specific Steps

Add -javaagent:/PATH/TO/NEWRELIC.JAR to your Java arguments in the Windows Service Console:

5 Read More