Dynatrace is a provider of application performance monitoring and IT operation intelligence software. In combination with Chaos Engineering experiments from Gremlin, you can tune your monitoring for more actionable data collection and alerting. Additionally, using Gremlin, you can train your team to interpret and investigate issues in your systems using Dynatrace.
If you want to get started using Dynatrace and Gremlin together, check out Ana’s tutorial. This tutorial will help you add webhooks if you want to visually correlate the impact of an attack with the result in Dynatrace.
Go to your Dynatrace controller. Capture your endpoint name from the URL:
1https://{your-domain}/e/{your-environment-id}/api/v1/events
1https://{your-environment-id}.live.dynatrace.com/api/v1/events
In my case, my endpoint is https://kep58706.live.dynatrace.com/api/v1/events
.
Then go to the host, application, or other entity that will be attacked. Capture the id. In my case, the entityId is for a host and is HOST-5927A0E39CF52333
. Keep both of these for Step 3.
Get your API key. Settings -> Integration -> Dynatrace API -> Generate token.
Name the key gremlin
. Turn off all options except “Access problem and event feed, metrics, and topology” and click “Generate.”
Save the API key for use in Step 3.
Go to Settings -> Team Settings.
Then select Webhooks -> New Webhook.
Add a new webhook with the Name Dynatrace Webhook
, a description, the endpoint URL from Step 1, then the Header Authorization
and the Value Api-token {your_api_key}
. Check “Attack Running” and “Attack Finished.” In the Payload, update the body to be the following, replacing {entity_id} with the id(s) from Step 1:
1{2 "eventType": "CUSTOM_ANNOTATION",3 "attachRules": {4 "entityIds":[{entity_id}],5 "tagRule":[{6 "meTypes" : [ "HOST" ],7 "tags" : [ { "context" : "CONTEXTLESS", "key" : "gremlin" } ]8 }]9 },10 "source": "Gremlin",11 "annotationType": "Gremlin ${ATTACK_TYPE} attack ${STATUS}",12 "annotationDescription": "Gremlin ${ATTACK_TYPE} attack ${STATUS}",13 "customProperties":14 {"gremlinSource":"${SOURCE}",15 "teamId": "${TEAM_ID}",16 "attackId": "${ATTACK_ID}",17 "finalStage": "${STAGE}"}18}
Click Save.
To try out our new annotations, we’ll run a CPU attack. In Gremlin, go to Attacks -> New Attack. Select a host that has a Dynatrace agent. Select Choose a Gremlin -> Resource -> CPU. Set the length to 300
seconds, 80
%, and All Cores
. Click “Unleash Gremlin”.
Then head over to Dynatrace and select Hosts. Select the Host you just attacked. Check out the CPU Utilization chart and the Events chart to see the Gremlin attack information.
Now you have the ability to visualize Gremlin attacks in Dynatrace with annotations for when attacks are running and finished. This is just one example of what you can do with webhooks and Dynatrace. From here, you can create dashboards for reporting the results of your attacks out to other teams or executives. For example, highlight how your application performed during a scheduled attack and show improvement over time. Try it out and share what you build!
Gremlin empowers you to proactively root out failure before it causes downtime. See how you can harness chaos to build resilient systems by requesting a demo of Gremlin.
Get started