To ensure your applications run smoothly, they need to be actively monitored so that the information is available in order to do the following:
- Avoid performance problems
- Diagnose performance problems when they occur
New Relic is a flexible application performance management tool that provides information to help you achieve the above goals.
This how-to will teach you how to do the following:
- Set up application performance management for your Mendix application on New Relic
Before starting with this how-to, make sure you have completed the following prerequisite:
- Create a New Relic account by signing up here: https://newrelic.com/signup
3 Setting Up
In this section, we will walk through all the steps to configure New Relic so that it can be used for application performance monitoring of your Mendix application.
3.1 Setting up New Relic (On-Premises Only)
The following steps are only relevant for on-premises deployments (skip to 2.2.1 Cloud Foundry if you are deploying your Mendix application to Cloud Foundry).
Log in to New Relic and create a new application:
Download the Java agent archive and save your license key:
Add your license key to the newrelic.yml file from the downloaded archive as described here: https://docs.newrelic.com/docs/agents/java-agent/installation/java-agent-manual-installation#h2-download-files.
3.2 Setting Up Your Mendix Deployment
Follow these build pack instructions to set up New Relic for Cloud Foundry deployments: https://github.com/mendix/cf-mendix-buildpack#new-relic.
3.2.2 On Premise Linux & Windows Service Console
javaopts list in your m2ee.yaml file, add “-javaagent:
javaopts: [ "-Dfile.encoding=UTF-8", "-XX:MaxPermSize=128M", "-Xmx512M", "-Xms512M", "-Djava.io.tmpdir=/srv/mendix/data/tmp", "-javaagent:/opt/newrelic/javaagent.jar" ]
3.2.3 Mendix Business Modeler (Development Mode Only)
Open your Mendix application, and click on Settings in the Project Explorer:
Open a configuration:
In the Extra JVM parameters field on the Server tab, add “-javaagent:
After completing the steps described above, all the requests handled by your Mendix application should become visible together with various graphs and statistics:
Your database calls and queries will now be visible on the database page:
6 Further Documentation
For more information on New Relic, see the New Relic documentation here: https://docs.newrelic.com/.
7 Related Content
- How to Find the Root Cause of Runtime Errors
- How to Clear Warning Messages in Mendix
- How to Monitor Mendix Using JMX
- How to Debug Java Actions Remotely
- How to Set Log Levels
- How to Debug Microflows
- How to Debug Java Actions
- How to Handle Common Mendix SSO Errors
- How to Solve Load and Import Errors
- How to Debug Microflows Remotely