In this article we will cover how to monitor an ADempiere application performance, how database is performing, which SQL statements taking more time etc with the tool like NewRelic.
Quick response is an important criteria for an application from end user perspective for any kind of application. This criteria is even more important in case of ERP applications where hundreds of users will be using it at any point of time. In order to improve performance of an application first we need to understand potential bottlenecks for the performance. We should a framework which can tell us where application is taking more time in a given functional use case and what could be the reason. New Relic is framework which helps in finding this kind of data for a given application.
Scope Of This Article:
This article explains how we can monitor an ADempiere application using Newrelic.
1. New relic setup in our application
2. Monitoring the ADempiere application at Newrelic
- Adempiere 360 and above.
- New-relic account.
- Application server [Jboss]
- New Relic provided jar file.
How to do it:
Follow the below steps to setup NewRelic with ADempiere :
New Relic Setup:
Step 1 :
Sign-up at Newrelic [ http://newrelic.com/ ]
Step 2 :
Login into Newrelic and download the Newrelic agent jar for java application, as shown in below image
Step 3 :
After successful download, you can see the newrelic_agentx.xx.x.zip file.
Move it to your application server’s home path.
For example if it is Jboss server, keep this download file at /file-path/jboss-x.x.x.GA/
Step 4 :
Extract the newrelic_agentx.xx.x.zip file. Extract the zip file and after extraction you will different files as shown in below image.
Step 5 : Giving name to our application.
Open the newrelic.yml file and search for app_name text. By default it is “My Application” replace it with your app name, and save it.
app_name : Adempiere Demo
Note: This file includes the license key of new-relic account.
Step 6 :
Go to newrelic directoy at command prompt and run the following command to install the Newrelic java agent
“java -jar newrelic.jar install”
On successful installation it shows “Install successful” message.
Step 7 : Restart the your application [Jboss] server.
We are done with Newrelic setup for ADempiere
Now login into Newrelic site and you will see the Adempiere_Demo application appears at Applications tab. Now play with various features provided by Newrelic by changing the configurations.
Monitoring the Adempiere application at Newrelic :
Newrelic provides various features to monitor application performance, some of them are :
- Response Time
- Apdex score
- Web Transactions
- Error rate
- Recent events
- Server information etc
As part of this article, some common features are setup and shown how they provide an useful information for analysis.
Lets us see how to customize the monitoring as per the application need. As part of this article we are covering how to customize Apdex score only.
Apdex score allows us to analyze the response time for a request. Based on this score we can estimate the our application user’s opinion towards our application.
If your application’s Apdex T-value is set to 0.5 seconds. That means requests responding in less than 0.5 seconds are satisfying by the end user. Responding between 0.5 seconds and 2.0 seconds are tolerating. If it responding in more than 2.0 seconds are frustrating the user.
This is works based on T [ response time threshold ] value. The default value in New Relic is 7.0 seconds for end users and 0.5 seconds for application servers.
How to change the Apdex score value for application specific :
1. Go to Applications.
2. Select gear icon as shown below. Select change settings option from drop down.
You get the following screen, Here you can change the Apdex T value.
App server response time:
By observing following screen shot we analyze that, for every 5 minutes its response time in milliseconds as graph representation.
It is response time for the request. It will measures in rpm (request per minute).
Error rate :
The Errors graph representation shows the error rate percentage for the selected time period.
Database report :
New Relic also provides the database report . Click on on Database tab to get its analysis report with day wise analysis . This reports includes the three parameters
1. Total Time
2. Through put
3. Average Time
This report will be generated based on these parameters. You can select these parameters from Plotting drop down.
Here it gives the analysis of each ADempiere table.
New Relic provides the background jobs report. Background jobs like ServletInit response report with in given time.
This report also includes three parameters.
You can select these from Plotting drop down.
New Relic provide the JVM memory management, like how it allocating memory for heap and how much memory committed for heap. This measurements available in graph representation for given time in terms of Megabytes.
Garbage collection CPU time :
It also provides the Garbage collection CPU time in terms of percentage with in given time.
Class Count :
You can also analyze the classes loaded at particular time. This graphical report shows Unloaded and Loaded classes information in terms of Kilobytes for given time.
Newrelic provides wide range of features to monitor application performance and accordingly we can act to take the appropriate actions on improving
Walking Tree promotes ADempiere and we support the users as well as the developers to ensure that the business is able to take complete advantage of ADempiere’s wonderful capability. In case you are looking for a professional assistance then do visit our website to get in touch with us.