Dynatrace Neoload integration, How to link load testing tool with APM.

March 23, 2022




The goal of this article is to set up an integration between Neoload and Apm dynatrace, to identify the neoload traffic on dynatrace and to visualize the neoload metrics on dynatrace and vice versa.


Prerequisites




dynatrace token to authenticate with the right rights.

Url of dynatrace server/cluster Saas or On permise.


The procedure


Generate the dynatrace API token:


In the menu " Access tokens " then " Generate access token ", enter a name, and select the following rights:

  • Access problem and event feed, metrics and topology
  • Capture Request Data
  • Read configuration
  • Write configuration
  • Read entities using API V2
  • Write entities using API V2
  • Read Metrics


Copy the generated token.


Configure Neoload


In Neoload, Edit > Preferences > Project settings > Dynatrace.

- Enable Dynatrace information

- In the field url fill the url with dynatrace which has the following format:

https://dynatrace.corporate.net/e/abc12345

- In the Api token field, enter the token generated previously




And then test the connection.

In case of a ssl certificate error like this:

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at com.neotys.nl.controller.at.c(at.java:366)

at com.neotys.nl.gui.h.h.c.a(c.java:82)

at com.neotys.nl.gui.h.h.c.doInBackground(c.java:63)

at javax.swing.SwingWorker$1.call(SwingWorker.java:295)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at javax.swing.SwingWorker.run(SwingWorker.java:334)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

follow these steps:

In CMD, move to NeoLoad_install_dir>\jre\lib\security

Make a backup of the cacerts file and run the following command:

..\..\bin\keytool.exe -import -alias NTS -file "certif.cer" -keystore cacerts -storepass changeit


Certif.cer is the certificate of the dynatrace website to recover with the following steps:



To export the certificate:



Then "Copy to file":





Choose the X.509 binary DER encoded format.
 

 

So what !?


Neoload adds the tag " X-Dynatrace-Test " in the headers of the requests launched by the load injectors, in addition it creates filters in dynatrace which makes it possible to identify the Traffic neoload.

The added tags are :


The NeoLoad UserPath name -> SN


The Load testing solution name -> SI


The transaction name -> NA


Load generator location (useful if you are generating load from the cloud) -> GR


Request generated by NeoLoad -> PC

Otherwise we can add tags manually by setting request attributes rules in Dynatrace, you will have to go to: 

• Settings / server-side service monitoring / request attributes




Create a rule for each piece of information sent by NeoLoad





Request attribute source: Http request header

Parameter name: x-dynatrace

Preprocess by extraction substring: between: 

NA= and; (for getting the NeoLoad transactions)
SI= and; (to detect NeoLoad traffic)
SN= and; (to detect the userpath name)
GR= and; (to detect the load generator zone of the virtual user

You Might Also Like

1 comments

About me

Photo Profile
Mohamed Diouane IT Architecture And Performance Engineer

In This blog I share with you my experience and my feedbacks :)Read More