title | category | tags |
---|---|---|
Manage Application Performance with AppDynamics |
Monitoring & Troubleshooting |
To ensure your applications run smoothly, they need to be actively monitored so that the information is available to do the following:
- Avoid performance problems
- Diagnose performance problems when they occur
AppDynamics 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 AppDynamics
Before starting with this how-to, make sure you have completed the following prerequisites:
- Create an AppDynamics account by signing up here
- AppDynamics provides two different options for hosting their environment: the SaaS or on-premises solution; if you want to install AppDynamics on-premises, see Get Started with AppDynamics On-Premise
In this section, we will walk through all the steps to configure AppDynamics so that it can be used for the application performance monitoring of your Mendix application.
To set up AppDynamics, follow these steps:
-
Navigate to your AppDynamics controller, where you should see the following screen:
-
Select Java.
-
This will open up the configuration screen for your AppDynamics application.
-
Download the Agent Installer and extract it to any directory (but remember the path, as this will be used later for integrating the Java Agent with your Mendix application):
Follow the the build-pack instructions to set up AppDynamics for Cloud Foundry deployments that are described here: https://github.com/mendix/cf-mendix-buildpack#appdynamics.
To the javaopts
list in your m2ee.yaml file, add "-javaagent:javaagent.jar". For example:
javaopts: [
"-Dfile.encoding=UTF-8", "-XX:MaxPermSize=128M", "-Xmx512M", "-Xms512M",
"-Djava.io.tmpdir=/srv/mendix/data/tmp",
"-javaagent:/opt/AppDynamics/AppAgent/javaagent.jar"
]
-
Open your Mendix application, and then select Settings in the Project Explorer:
-
Open a configuration:
-
In the Extra JVM parameters field on the Server tab, add
-javaagent:<path-to-javaagent>javaagent.jar
and-Dappagent.install.dir=<path-to-javaagent>
WITHOUT thejavaagent.jar
: -
As the last step of setting up your Mendix application, set the following extra configuration values in the
AppServerAgent/ver4.x/conf/controller-info.xml
file (wherex
is the version of AppDynamics you downloaded):application-name
(for instance MyMendixApp; this will be the name that will be used within AppDynamics)tier-name
(for instance tier-1)node-name
(for instance node-1)
-
Run your Mendix application to generate data for AppDynamics. Sometimes AppDynamics does not automatically find your application in the configuration screen, so make sure to check the Applications tab for whether the application shows up there.
Now that your Mendix application has been set up to provide its information using the Java agent, AppDynamics needs to be configured so that it can be displayed in a useful way. This information will be presented as business transactions that will show the requests handled by the request handlers and the Mendix actions that have been triggered. These business transactions will allow you to pinpoint the bottle necks and issues in your Mendix application.
To configure these business transactions, follow these steps:
-
From the Applications page, select your application:
-
Open the Configuration page (1) and click Instrumentation (2):
-
On the Instrumentation page, navigate to the Transaction Detection tab (1), and add a new Custom Match Rule (2):
To monitor your actions as business transactions, follow these steps:
-
From the Add Rule page, select Java for the Agent Type of the custom match rule and POJO as the Entry Point Type:
-
Fill in the Summary tab with POJO as the Entry Point Type, then enter ExecutionAction for the Name, click the Enabled check box, and set Scope to Default Scope:
-
Fill in the Rule Configuration tab with the information presented in this screenshot (the yellow highlighted field should be com.mendix.core.actionmanagement.CoreAction):
-
After saving, the Mendix actions will appear under Business Transactions:
To set up monitoring on the request handlers, follow these steps:
-
From the Add Rule page, select Java for the Agent Type of the custom match rule and POJO as the Entry Point Type:
-
Fill in the Summary tab with POJO as Entry Point Type, then enter RequestHandler for the Name, click the Enabled check box, and set Scope to Default Scope:
-
Fill in the Rule Configuration tab with the information presented in this screenshot (the yellow highlighted field should be com.mendix.externalinterface.connector.RequestHandler):
-
After saving, the requests will appear as Business Transactions:
AppDynamics can automatically detect web service calls. This feature is enabled by default and can be found in the Service Endpoints menu item:
AppDynamics automatically detects database calls. These can be viewed by navigating to the Database Calls page:
Once you have performed all of the steps above for your Mendix application, its topology should become visible by navigating to the Application Dashboard page. Here you can see an overview of your application and all of its integrations with external systems.
For more information on AppDynamics, see the AppDynamics documentation here: https://docs.appdynamics.com/.