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

Add email address to audit logs in Dynatrace SaaS

avinashpodisett
Frequent Guest

Pain Journey: Need to write a javascript code snippet to do a look-up on audit logs to find the user email address

Benefit: having an email ID simplifies a few things. Easy to communicate and will be able to track activity 

Solution Journey:


4 REPLIES 4

ChadTurner
DynaMight Legend
DynaMight Legend

This is partially completed in the UI. If you go to the entity in question and then see the revision history, you can see the email address of the changer. 

This should also be present in the Json pull but you may need to split that out. There is also the services portal but that has its own limitations for the SaaS customers. 

ChadTurner_0-1720645094802.png

 

-Chad

Hi Chad, 
 thanks for responding..we would like to go through all logs in last 7 days and find out if any users made any changes to the environment. so  this solution won't work for us.
thanks again
Avi

@avinashpodisett thanks for your reply, im excited to share with you that this is available via the API. 

If you navigate to API V2 and select the audit logs, you can put in your time frame analysis. I put in 1 entry in the last 2 hours to cut down my query and amount of data i needed to mask. 

ChadTurner_0-1720707528617.png

The results will be raw, but you can ingest that into excel and break it down into the following results: 

ChadTurner_1-1720707667506.png

 

As mentioned this is really simplistic as it is login, once you pull that data set you can then massage it as needed. Exclude login/logout, include create, modify etc.... But i think this is the solution that you are seeking. You can then leverage the sorting's and filtering segments inside excel. I hope this helps 🙂 In excel I use the data ingest for Json and then break it all out collectively. 

-Chad

If people are making changes by way of tokens, you will be stuck with Token ID's but if you have an effective naming convention you can then convert the token ID to the named owner of the token or if you created for a user, you can attribute the friendly name to the token entry.

-Chad

Featured Posts