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

extract user name from http header

tahir_ghulam1
Contributor

i am trying to extrac username from http-Header

username is a Parameter of the post request and Comes like this username=

the configuration of the Software Services looks like

I am not sure about host pattern an path pattern.

documentation

https://community.dynatrace.com/community/display/...

did not really help because described information are not seen from my side.

Kind Regards

14 REPLIES 14

tahir_ghulam1
Contributor

from reading the documentation i changed it to this :

as i can see in vdata there are parameter entries like Username=XYZ&password | username= in the POST request.

tahir_ghulam1
Contributor

Changed it to Request Parameters in Search Scope,

i am excpecting results in the dmi Report that user id should appear. but i can just see ip-adresses.

matt_lewis
Dynatrace Advisor
Dynatrace Advisor

Hey Tahir,

Looks like you're off to a good start. I recommend that users (even advanced users like myself) wishing to pull out usernames via username recognition do so by configuring this in the Software Services wizard. The wizard allows you to visually see what the AMD is seeing (via a traffic capture), and then pick exactly which parameter(s) you want out of the traffic trace to use for username recognition. There is a good video on APM-U that goes through this process. While the whole video has loads of great information, the exact username recognition bit is at about the 4:57 minute mark:

Using the Software Service Wizard

Let me know how you go, or if you have any more issues after following this video.

Thanks,

-Matt Lewis

tahir_ghulam1
Contributor

Hi Matt,

this was really a valuable hint. i think in finally managed to cinfigure user recognition from the wizard

the test that is available ther matched with the username=.

But in my DMI-Reports i just see Ip-Adresses, where can i see die extracted User-ID's ?

Kind Regards

cosmin_gherghel
Dynatrace Pro
Dynatrace Pro

Hi Tahir,

To view the extracted user names you can either use the DMI Dimension "User Name" or the out of the box reports that have drill downs to view user names. The easiest way is to go to the Software Services report and click on the Unique and Affected Users column to view all users for the selected Software Service.

Regards,

Cosmin

tahir_ghulam1
Contributor

Hm, i can sse just IP-adresses there. I do not see any extracted userkeys.

here is my config-change : but username is not displaying in Report.

kgillette
Guide

IP for me too. Not sure what to do either.

harshal_pujari
Dynatrace Pro
Dynatrace Pro

Here is a possibility:

Check your CAS personality configuration. If your CAS personality is set to FE mode, you will always see IP addresses.

Go to http://CASIPAddress/RtmGenCfg

dcrum-unique-users.jpg

Please make sure that if you want to change the CAS personality configuration, you will have to purgeyour database and will lose the historical data.

kgillette
Guide

My looks look that except for bigger IP range

matt_lewis
Dynatrace Advisor
Dynatrace Advisor


Tahir,


Looks like you've completed this correctly, but are you using 12.3.5? In that version there appears to be a bug that causes issues when you use the '=' sign in the parameter value. Can you try the exact setup that you have, but just have the value be 'username'. That should give you the '=' sign with the username. So if the parameter looked like this: username=MLewis, the result in a report showing usernames would be: =MLewis


If you would like to get rid of the '=' sign in the username, then you will have to go with a 'regex' for the Type, not 'Parameter name and prefix search' The regex would be something like this: ^username=([^&]*)

(Note: i am not an expert in RegEx, so if someone has a more efficient one for this use case, feel free to post below!)

Be sure to publish after changes to the software service, and let me know how you go.

Thanks,

-Matt Lewis

tahir_ghulam1
Contributor

Hi all,

thank you for supporting me.

@Matt : Did you see Harshal's comment. CAS Configuration in my case shows FE Mode.

Changing my configuration at this point and therefor purging my complete historical data would be a no go for me.

tests with your proposed configuration Change delivered

Looks good. But in my reports there are still just ip adresses.

Bets Regards

tahir_ghulam1
Contributor

Hi all,

thank you for supporting me.

@Matt, did you see Harshals's comment. My configuration is set to FE mode.

So if changing this would cause a loss of historical data, this would be a no go for me.

Right now with changes you adviced i do not see any changes right now. Usernames are as they were before.

Kind Regards

Hey Tahir,

I just assumed that with username recognition enabled it would override the 'mode' set for the CAS, but this may not be the case. I am now thinking that when a CAS in in FE Mode, it ONLY tracks user IP's, and does not care about any other form of user identification. I agree, if you are in production, you most likely would not want to go changing this mode, and then have to purge the DB.

Would need someone else to confirm this is the case regarding FE mode not tracking Usernames.

Thanks,

-Matt Lewis

Hi Matt/Tahir,

FE mode does override the username recognition.

See this from the documentation:

"

FE mode records each client IP address separately (it
ignores recognized user names and reports users with IP-address resolution)."

Documentation Link

Hope this helps,

Harshal.