17 Feb 2022 02:14 PM
Hello there is a new way to create and remove key requests in a service:
No more waiting for the request to show itself, thanks Dynatrace!
KR Henk
Solved! Go to Solution.
17 Feb 2022 03:00 PM
Great find, finally addresses this Product Idea.
18 Feb 2022 07:06 AM
Also the "Muted requests" just below that option is new 😉
18 Feb 2022 08:11 AM
Thanks for sharing, Henk!
28 Feb 2022 01:06 PM
Only remark: The Key requests and Mute requests options are also visible for Database services but have no function there...
28 Feb 2022 01:15 PM
Great find Henri!
01 Mar 2022 04:59 AM - edited 01 Mar 2022 05:03 AM
Just to round off this thread, there is an API available to do this way ahead of time too (as part of a pipeline?) I've wrapped it in a container.
1. Create a Dynatrace API token with v2 read entities and write settings permissions
2. Create a CSV using a pipe as a separator. Save as input.csv:
entitySelector|request_name
type(SERVICE),tag(app:frontend)|/pageOne.html
type(SERVICE),tag(app:frontend),tag(environment: production)|/pageTwo.html
type(SERVICE),tag(app:frontend)|/pageThree.html
type(SERVICE),tag(app:frontend)|/pageFour.html
2. From the same directory, run this:
docker run --rm ^
--mount type=bind,source=%cd%/input.csv,target=/app/input.csv ^
-e filename=input.csv ^
-e dt_url=https://abc12345.live.dynatrace.com ^
-e dt_api_token=dt0c01.************* ^
adamgardnerdt/key-request-creator:0.0.2
For debugging add a new -e parameter dt_logging=1:
docker run --rm ^
--mount type=bind,source=%cd%/input.csv,target=/app/input.csv ^
-e dt_logging=1 ^
-e filename=input.csv ^
-e dt_url=https://abc12345.live.dynatrace.com ^
-e dt_api_token=dt0c01.************* ^
adamgardnerdt/key-request-creator:0.0.2
1. Mount the input.csv file into /app/input.csv inside the container.
2. For each entity selector, the script looks up the matching SERVICE IDs then creates Key requests against them.
1. The entity type (eg. SERVICE) must exist before you can create config against it. So as long as the SERVICE is there, the key request will be created (even if that endpoint has never had traffic) but no service = no key request. So it's easy to ensure this. Onboard your service and send a few requests to /dummy (even if it 404s) and the service will be available within minutes.
17 Apr 2022 06:03 PM
Thank you @adam_gardner. It is really useful. We can develop our automation but there is not a any guide or example for this. Indeed, confusing a little bit.
Is it possible to share with us the guide or example for just key request api usage ?