Get more results from AppDynamics in Maximo
If you ever configured AppDynamics to monitor the Maximo performance, you must have noticed that it is not apparent which Maximo application generates the load. I will demonstrate the easy way to setup AppDynamics to get the most from the Maximo performance data.
One of the most useful features in AppDynamics is the concept of the business transactions, that is an end to end performance metrics for specific actions performed by the user. For very complex systems like Maximo it is impossible to cover all the possible business use cases. It would be good, though if it were possible to get the performance metrics breakdown by the Maximo application. In the picture below, you see the performance metrics coming from different Maximo applications: rfq, pr, wotrack, plusgptw_g, inventor, item...
Take a look at the following network request coming to Maximo:
When the user navigates to the new application in Maximo, the application name is sent to the Maximo server. We will use this fact to create the cookie that stores the application name between the requests and use this cookie to get the business transactions in AppDynamics. We use the Servlet Filter for that purpose:
package custom.webclient.servlet;
import javax.servlet.*;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* The filter should add the custom cookie once the app load event comes (i.e. the new app is loaded)
* The purpose of that is to separate business transactions in AppDynamics
*/
public class AddCookieFilter implements Filter {
@Override
public void destroy() {
}
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
final String event = servletRequest.getParameter("event");
final String value = servletRequest.getParameter("value");
if (event == null || value == null || !event.equals("loadapp")) {
filterChain.doFilter(servletRequest, servletResponse);
return;
}
Cookie appCookie = new Cookie("maximoapp", value);
appCookie.setPath("/");
((HttpServletResponse) servletResponse).addCookie(appCookie);
filterChain.doFilter(servletRequest, servletResponse);
}
}
Don't forget to define the filter in web.xml:
<filter>
<filter-name>AddCookieFilter</filter-name>
<filter-class>custom.webclient.servlet.AddCookieFilter</filter-class>
</filter>
and configure where it is used(also in web.xml):
<filter-mapping>
<filter-name>AddCookieFilter</filter-name>
<url-pattern>/ui/*</url-pattern>
</filter-mapping>
When restarting the application, make sure the cookie is set:
In the AppDynamics Instrumentation define the new Transaction Detection:
Within several minutes, you will have the business transactions data coming to AppDynamics.