cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Web request clean URL rule not working as intended

adam_sjoerdsma
Inactive

Hi,

My customer wants me to try and cleanup the requests in Dynatrace for a number of the services in their monitored applications.

I tried to test the URL Cleanup rule for one of the requests, but the results were not what I expected.

The example that I was testing on, was for a number of requests in a service that are formatted similar to the below example.

Example Request:

/prweb/PRServlet/MIEk-3UAC9M7mlVhvTQdsLg84mofwl7BL0nrQpWhKBg%5B*/!STANDARD

The goal from my customer, is to remove/mask the string of characters that start with MIEk and end right before the "/"

Example Request (Part that should be masked in bold)

/prweb/PRServlet/MIEk-3UAC9M7mlVhvTQdsLg84mofwl7BL0nrQpWhKBg%5B*/!STANDARD

They would like to see these kinds of requests cleaned up so that they look like the example below.

Desired Output Example:

/prweb/PRServlet/*/!STANDARD


I attempted to perform this by adding a cleanup rule, however when I checked the requests, they all were being renamed with just a /

Results:

Does anyone know what I did wrong with my rule, and how I can properly implement this?

Thanks,

Adam Sjoerdsma


2 REPLIES 2

david_n
Inactive

Hello Adam,

Try this regex: (MIEk).*[\/]

Then you can replace it with: \*\/

Note: there is a backslash in front of the * but it is not showing up in the replacement regex.

Let me know if that works

Thanks,

David Nicholls


Thanks David! This helped me better understand how the regex needed to be applied.


Featured Posts