During my last LIUG presentation on this topic, many participants showed interest in this tool and they wanted to try this in their enviornment. I am writing this blog for beginners, who want to explore Dyntrace APM with Liferay DXP.
What is Dynatrace:
DynaTrace Software is an Application Performance Monitoring tool (APM) ,Which is widely used nowadays .It comes with advanced features for monitoring Java. Through which we can easily identify the performance of our application.
We are using it to discover the existence of abnormalities in CPU Performance, response time, transaction rate, throughput and system usage. It has helped to diagnose and fix many performance issues at an early stage and make our application more value able
It works based on Pure Path. Pure Path? Will explain
How it works:
Dynatrace works based on PurePath technology and monitor each and every node of your transactions. A PurePath is the horizontal view of a transaction in a monitored application environment and is the basis for top down analysis, which is defined by analyzing how an application or transaction is impacted by the underlying infrastructure.
For more information about Dynatrace, please refer: https://www.dynatrace.com/
How to monitor DXP using Dynatrace:
1. Download Dynatrace full APM from this link. Current available version for Dynatrace is 7.0. You can get 30 days license to explore Dynatrace.
Below diagram shows, how does Dynatrace works in this example. There are many agents avaiable for each tier Database, Web Server etc but in this example, I used only application server tier. Logic remains the same for other tiers.
2. Once you have installed Dynatrace Server, Collector, Client (Full installation contains all), you can start client and during start over, you will able to see screen "Application Environment Configurations". We need to select application server tomcat (Assuming we are going to monitor DXP bundle with tomcat running on same machine) and give name to your tier for example : Tomcat. You can choose any name.
Select Apache Tomcat from below list and click "Next". Over Next screen, select value as:
Where Tomcat is installed? On this Machine
JVM_Version : 5 or high ( As per OS bit)
After clicking "Next", next screen will show you parameters to add into your JVM for enabling agent, as per my machine (Dont use it, just for example):
-agentpath:"C:\Program Files\Dynatrace\Dynatrace 7.0\agent\lib64\dtagent.dll"=name=Tomcat_Monitoring,server=sibl15exci:9998
3. Copy parameters and append this to your CATALINA_OPTS in setenv.bat/setenv.sh files of Tomcat server.
4. Restart your server and you should able to see monitoring data under Database, Agent
Now, you will able to see DXP performance monitoring data like : PurePath, Exceptions, Incidents, Response time, Thread dumps, memory dumps analsysis.
Till this setup monitoring the DXP is same as Dynatrace does for any other web application.
Liferay Dynatrace Fast Pack:
Its a pre-configured plugin for Dynatrace which provides monitoring specific to Liferay DXP environment. It provides System profile, Dashboard and sensors for Liferay environment.
You can download this fast pack from this link
You can install this plugin using Dyntrace client by clicking Tools > Manage Plugins and then install plugin by providing location for above downloaded .dts file.
After installing this plugin, you can see new System profile named as "Liferay" and Business Transaction provided with this pack:
This business Transactions provides monitoring specific to Liferay enviroment for example :
1. Liferay login request : Count, time taken, CPU time etc for login requests
2. Liferay Logout Request : Count, time taken, CPU time etc for logout requests
3. Portlet <name> action processed : Details for Process actions in portlets like : Wiki, Web Content, Blogs, Document and Media etc.
4. Portlet <name> view rendered : Details for rendered portlets. It can tell you which portlet is taking long and performance degrader.
5. CSS client side : Details about client side CSS and identifies which CSS took long to load.
Similarly CSS server side, JS client side and JS server side. There are many more business transactions provided which helps to monitor Liferay specific elements.
If you dont see any details under "Liferay" profile after installing agent into DXP bundle. Veirfy your agent mapping.
Open agent mapping, by double clik "Liferay" system profile and verify agent name listed there matches with your JVM OPTS name appended during agent installation.
If its not matching, change the agent name and click apply. Restart your DXP bundle and verify after restart, monitoring data should start capturing.
There are few tools I used to monitor Liferay in past but after using this can say Dynatrace is really helpful to find bottleneck easily in crticial Liferay portal and there is a very minimal learning curve.