Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
10-05-2017 03:44 AM
Hey all,
I was wondering if you can use REGEX for matching the HTTP parameter existance. I can't ready anywhere something about it yet it seems like you can only use regex at checking the parameter value.
The scenario:
The link is '/pages/cases?162-1.IBehaviorListener.0-caseOverviewForm-caseOverviewResultPanel-casesBody-cases-1-specialAttentionCell' where '162-1.IBehaviorListener.0-caseOverviewForm-caseOverviewResultPanel-casesBody-cases-1-specialAttentionCell' ' is the parameter with no value. The tricky thing is that the parameter changes the number with each case.
So the example link looks like this
162-1.IBehaviorListener.0-caseOverviewForm-caseOverviewResultPanel-casesBody-cases-1-specialAttentionCell' or
122-1.IBehaviorListener.0-caseOverviewForm-caseOverviewResultPanel-casesBody-cases-0-specialAttentionCell' or
10-1.IBehaviorListener.0-caseOverviewForm-caseOverviewResultPanel-casesBody-cases-3-specialAttentionCell'
So I figured I'll do this through REGEX with: \d.*(-1.IBehaviorListener.0-caseOverviewForm-caseOverviewResultPanel-casesBody-cases-)\d.*(-specialAttentionCell)
That however doesn't work?
Any tips or tricks?
10-05-2017 03:51 AM
What Business Transactions would you like to be tracking as a result of the rule you're trying to create and the example links you provided?
10-05-2017 03:54 AM - edited 10-05-2017 03:54 AM
Its a servlet transaction. The action that it registers is opening a case. There are multiple cases and each one has different number registration.
10-05-2017 04:23 AM
So is the problem statement that you want a BT for HTTP requests that hit the /pages/cases URL ONLY if a parameter of the form you provided exists?
10-05-2017 04:33 AM
Thats exactly what I want. To clarify it even more.
The url /pages/cases is a business transaction already. I however need to monitor one extra substep that falls under the .pages/cases link. The thing that makes the transaction unique is the HTTP parameter as provided above. The crux is that http parameter can change depending on which case you open. So if I tell Appdynamics to check specifically for the the parameter above It'll only do it for that specific case. so the specific parameter needs to be filtered to a general parameter.
10-05-2017 05:01 AM
I have not tested, but you could try a rule which matches /pages/cases and configure the following split:
Apply a custom expression on HTPServletRequest
getQueryString().matches(\.*BehaviorListener\.\\d+-caseOverviewForm-caseOverviewResultPanel-casesBody-cases-\\d+-specialAttentionCell\.*)
If my regex-fu is right, this will result in 2 BTs called name.true and name.false where name.true is the class of BT you're trying to get at
10-09-2017 04:12 AM
Interesting. I'm going to check this out this week
Still one question though. Is it possible to use regex in the HTTP parameter or is this only possible for de values of HTTP parameters?
I'll get back on you about the given solution.
Thanks!
03-14-2018 09:15 AM
Hey Pholditch,
Just getting back to you. The solution did work however not the way you explained. I've changed the regex expression and right now a transaction wil get the name of the custom rule as soon as the regex matches. Not getting back any boolean. This kind of acts as I wanted (sometimes the results still are weird though. Could be the regex).
Anyways is there any kind of feature coming in the future for performing regex on http parameters names?
Thanks for the solution
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form