tl;dr — With a few quick steps, engineers who use AppDynamics as their Application Performance Monitoring solution can see server behavior in their Load Impact tests.
This example shows how to get a single CPU metric from AppDynamics into Load Impact test results using the Load Impact Server Metrics Agent
Make sure your AppDynamics agents are properly set up, configured and running with your application. If you're reading this, chances are you're an AppDynamics user, so you're probably good there.
Get your Load Impact Server Monitoring Agent and install it on your server.
See this Knowledge Base Article if this is not already set up
Go into your AppDynamics panel and find the REST API URL for the particular metric you want to collect.
For our example, our CPU metric is the following
Assuming you have installed your Load Impact Server Metrics Agent on a windows box, create a powershell script containing this (named appdynamics_cpu.ps1):
And to be able to run the powershell script we are somewhat lazy (and skip setting up proper authorization and authentication on our windows box, do not do this in your production environment and create a cmd file containing this (named appdynamics.cmd):
Now to the interesting part, how to get that into Load Impact!
Open the li_metrics_agent.conf file located in your server metrics agent install folder. On a windows box that typically is c:\server metrics agent.
Find the section that starts with
This section is where you add any and all extra metrics to collect during the test run.
Save and recycle your server metrics agent service (it’s aptly named Load Impact Server Metrics Agent Service) to pick up the configuration changes.
The next time you run your test and include the server metrics agent in the test config (see #1 for usage) you will get the AppDynamics metric included so you can plot like this:
And for those of you not deploying the Load Impact Server Metrics Agent on windows but rather on a \*nix this shell script (named appdynamics.sh in this example) will output the same thing as the cmdfile/powershell combo on windows (it uses curl to call the REST API, get here if you don’t have it http://curl.haxx.se/):
And just for clarity you would add this line to your `li_metrics_agent.conf`
Now that you know how to do it, go find your analytics metrics in AppDynamics, include them in your test runs and enjoy correlating analytics and results at the speed of test!