-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployed 0867e07 with MkDocs version: 1.6.0
- Loading branch information
1 parent
8f3c282
commit 0d7f6c0
Showing
4 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"1. About","text":"<p>This demo will run a Grafana k6 script and use the Dynatrace output plugin to stream metrics to Dynatrace.</p> <p></p>"},{"location":"#compatibility","title":"Compatibility","text":"Deployment Tutorial Compatible Dynatrace Managed \u2714\ufe0f Dynatrace SaaS \u2714\ufe0f"},{"location":"#click-here-to-begin","title":"Click Here to Begin...","text":""},{"location":"cleanup/","title":"4. Cleanup","text":"<p>To cleanup resources, go to https://github.com/codespaces and delete the codespace.</p> <p>You may also want to deactivate or delete the API token.</p>"},{"location":"cleanup/#whats-next","title":"What's Next?","text":""},{"location":"getting-started/","title":"2. Getting Started","text":""},{"location":"getting-started/#gather-details-tenant-id","title":"Gather Details: Tenant ID","text":"<p>You will need access to a Dynatrace tenant. If you do not have access, sign up for a free 15 day trial.</p> <p>Make a note of your Dynatrace tenant ID. It is the first bit of your URL (eg. <code>abc12345</code> in the following examples):</p> <pre><code>https://abc12345.live.dynatrace.com\nhttps://abc12345.apps.dynatrace.com\n</code></pre> <p>Reformat the URL like this: <code>https://TENANT_ID.live.dynatrace.com</code> eg. <code>https://abc12345.live.dynatrace.com</code></p>"},{"location":"getting-started/#gather-details-create-api-token","title":"Gather Details: Create API Token","text":"<p>k6 requires an API token to stream metrics to Dynatrace.</p> <p>Create an API token with the following permissions:</p> <ul> <li><code>metrics.ingest</code></li> <li><code>openpipeline.events_sdlc</code></li> </ul>"},{"location":"getting-started/#start-demo","title":"Start Demo","text":"<p>Click this button to launch the demo in a new tab.</p> <p></p>"},{"location":"getting-started/#click-here-to-run-the-demo","title":"Click Here to Run the Demo...","text":""},{"location":"resources/","title":"6. Resources","text":""},{"location":"resources/#resources","title":"Resources","text":"<ul> <li>Sign up for a Dynatrace Trial</li> <li>k6 on Dynatrace Hub</li> <li>Dynatrace xk6 output plugin source code on GitHub</li> <li>This tutorial on GitHub</li> </ul>"},{"location":"run-demo/","title":"3. Run Demo","text":""},{"location":"run-demo/#import-dynatrace-dashboard","title":"Import Dynatrace Dashboard","text":"<p>While you are waiting for the environment, add the dashboard to your Dynatrace environment.</p> <ol> <li>Save the k6 dashboard to your local machine.</li> <li>In Dynatrace, navigate to <code>Dashboards</code> and click <code>Upload</code></li> <li>Upload the dashboard JSON file</li> </ol>"},{"location":"run-demo/#start-k6","title":"Start k6","text":"<p>In the codespace terminal, type <code>docker ps</code> and wait until Docker is running.</p> <p>You should see this:</p> <pre><code>CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n</code></pre> <p>Now run k6 with the demo script. Copy and paste this as-is into the terminal window:</p> <pre><code>docker run \\\n -e K6_DYNATRACE_URL=$DT_URL \\\n -e K6_DYNATRACE_APITOKEN=$DT_K6_TOKEN \\\n --mount type=bind,source=./k6scripts,target=/k6scripts hrexed/xk6-dynatrace-output:0.11 run /k6scripts/script.js \\\n -o output-dynatrace\n</code></pre>"},{"location":"run-demo/#validate-metrics","title":"Validate Metrics","text":"<p>k6 streams metrics into Dynatrace so after about a minute, do the following to ensure metrics are reaching Dynatrace.</p> <p>In Dynatrace:</p> <ul> <li>Press <code>ctrl + k</code> and search for <code>notebooks</code></li> <li>Create a new notebook and add a new <code>DQL</code> section</li> <li>Type the following: <code>timeseries avg(k6)</code></li> <li>Press <code>ctrl + =</code> to bring up auto completion. You should see the list of ingest</li> </ul> <p></p>"},{"location":"run-demo/#view-dashboard","title":"View Dashboard","text":"<p>Open the prebuilt dashboard you previously uploaded.</p> <p>Go to Dashboards (<code>ctrl + k</code> and search for <code>Dashboards</code>)</p> <p>The dashboard will begin to be populated with data.</p> <p></p> <p>The demo is complete.</p>"},{"location":"run-demo/#click-here-to-delete-and-cleanup-resources","title":"Click Here to Delete and Cleanup resources...","text":""},{"location":"whats-next/","title":"5. What's Next?","text":"<p>The k6 listing on the Dynatrace Hub contains information about how to build your own custom k6 binary using <code>xk6</code>.</p> <p>You can also browse the source code of the Dynatrace plugin, get support and request enhancements on the Dynatrace xk6 output plugin on Github.</p> <p>View the resources page for more links and useful materials.</p>"}]} | ||
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"1. About","text":"<p>This demo will run a Grafana k6 script and use the Dynatrace output plugin to stream metrics to Dynatrace.</p> <p></p>"},{"location":"#compatibility","title":"Compatibility","text":"Deployment Tutorial Compatible Dynatrace Managed \u2714\ufe0f Dynatrace SaaS \u2714\ufe0f"},{"location":"#click-here-to-begin","title":"Click Here to Begin...","text":""},{"location":"cleanup/","title":"4. Cleanup","text":"<p>To cleanup resources, go to https://github.com/codespaces and delete the codespace.</p> <p>You may also want to deactivate or delete the API token.</p>"},{"location":"cleanup/#whats-next","title":"What's Next?","text":""},{"location":"getting-started/","title":"2. Getting Started","text":""},{"location":"getting-started/#gather-details-tenant-id","title":"Gather Details: Tenant ID","text":"<p>You will need access to a Dynatrace tenant. If you do not have access, sign up for a free 15 day trial.</p> <p>Make a note of your Dynatrace tenant ID. It is the first bit of your URL (eg. <code>abc12345</code> in the following examples):</p> <pre><code>https://abc12345.live.dynatrace.com\nhttps://abc12345.apps.dynatrace.com\n</code></pre> <p>Reformat the URL like this: <code>https://TENANT_ID.live.dynatrace.com</code> eg. <code>https://abc12345.live.dynatrace.com</code></p>"},{"location":"getting-started/#gather-details-create-api-token","title":"Gather Details: Create API Token","text":"<p>k6 requires an API token to stream metrics to Dynatrace.</p> <p>Create an API token with the following permissions:</p> <ul> <li><code>metrics.ingest</code></li> <li><code>openpipeline.events_sdlc</code></li> </ul>"},{"location":"getting-started/#start-demo","title":"Start Demo","text":"<p>Click this button to launch the demo in a new tab.</p> <p></p>"},{"location":"getting-started/#click-here-to-run-the-demo","title":"Click Here to Run the Demo...","text":""},{"location":"resources/","title":"6. Resources","text":""},{"location":"resources/#resources","title":"Resources","text":"<ul> <li>Sign up for a Dynatrace Trial</li> <li>k6 on Dynatrace Hub</li> <li>Dynatrace xk6 output plugin source code on GitHub</li> <li>This tutorial on GitHub</li> </ul>"},{"location":"run-demo/","title":"3. Run Demo","text":""},{"location":"run-demo/#import-dynatrace-dashboard","title":"Import Dynatrace Dashboard","text":"<p>While you are waiting for the environment, add the dashboard to your Dynatrace environment.</p> <ol> <li>Save the k6 dashboard to your local machine.</li> <li>In Dynatrace, navigate to <code>Dashboards</code> and click <code>Upload</code></li> <li>Upload the dashboard JSON file</li> </ol>"},{"location":"run-demo/#start-k6","title":"Start k6","text":"<p>In the codespace terminal, type <code>docker ps</code> and wait until Docker is running.</p> <p>You should see this:</p> <pre><code>CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n</code></pre> <p>Now run k6 with the demo script. Copy and paste this as-is into the terminal window:</p> <pre><code>docker run \\\n -e K6_DYNATRACE_URL=$DT_URL \\\n -e K6_DYNATRACE_APITOKEN=$DT_K6_TOKEN \\\n --mount type=bind,source=./k6scripts,target=/k6scripts hrexed/xk6-dynatrace-output:0.11 run /k6scripts/script.js \\\n -o output-dynatrace\n</code></pre>"},{"location":"run-demo/#validate-metrics","title":"Validate Metrics","text":"<p>k6 streams metrics into Dynatrace so after about a minute, do the following to ensure metrics are reaching Dynatrace.</p> <p>In Dynatrace:</p> <ul> <li>Press <code>ctrl + k</code> and search for <code>notebooks</code></li> <li>Create a new notebook and add a new <code>DQL</code> section</li> <li>Type the following: <code>timeseries avg(k6)</code></li> <li>Press <code>ctrl + =</code> to bring up auto completion. You should see the list of ingest</li> </ul> <p></p>"},{"location":"run-demo/#view-events","title":"View Events","text":"<p>When the load test finished, the teardown function sends a Software Delivery Lifecycle Event (SDLC) to Dynatrace.</p> <pre><code>// Run load with 2 virtual users for 1 minute\nexport const options = {\n vus: 2,\n duration: '1m',\n};\n\n...\n\nexport function teardown() {\n let post_params = {\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Api-Token ${__ENV.K6_DYNATRACE_APITOKEN}`\n },\n };\n\n // Send SDLC event at the end of the test\n let payload = {\n \"event.provider\": \"k6\",\n \"event.type\": \"test\",\n \"event.category\": \"finished\",\n \"service\": \"dummyservice\",\n \"duration\": options.duration\n }\n let res = http.post(`${__ENV.K6_DYNATRACE_URL}/platform/ingest/v1/events.sdlc`, JSON.stringify(payload), post_params);\n}\n</code></pre> <p>Notice that the event contains metadata such as the <code>provider</code> and <code>service</code> which can be used for filtering in Dynatrace (see DQL below).</p> <p>This event can be used as a trigger Dynatrace for workflows, synthetic tests, the site reliability guardian and more.</p> <p>In Dynatrace:</p> <ul> <li>Press <code>ctrl + k</code> and search for <code>notebooks</code></li> <li>Open an existing notebook or create a new one</li> <li>Add a new <code>DQL</code> section and paste the following</li> </ul> <pre><code>fetch events\n| filter event.kind == \"SDLC_EVENT\"\n| filter event.provider == \"k6\"\n</code></pre> <p></p> <p>User exercise: Modify the JSON body to also send the number of Virtual Users (VUs) used to Dynatrace. Re-run the load test to see the new event.</p>"},{"location":"run-demo/#view-dashboard","title":"View Dashboard","text":"<p>Open the prebuilt dashboard you previously uploaded.</p> <p>Go to Dashboards (<code>ctrl + k</code> and search for <code>Dashboards</code>)</p> <p>The dashboard will begin to be populated with data.</p> <p></p> <p>The demo is complete.</p>"},{"location":"run-demo/#click-here-to-delete-and-cleanup-resources","title":"Click Here to Delete and Cleanup resources...","text":""},{"location":"whats-next/","title":"5. What's Next?","text":"<p>The k6 listing on the Dynatrace Hub contains information about how to build your own custom k6 binary using <code>xk6</code>.</p> <p>You can also browse the source code of the Dynatrace plugin, get support and request enhancements on the Dynatrace xk6 output plugin on Github.</p> <p>View the resources page for more links and useful materials.</p>"}]} |
Binary file not shown.