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:

  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.

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:

Read More