一键导入
一键导入
| name | dynatrace-workflow |
| description | Create and update Dynatrace workflows for DSOA automation |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers"} |
Use this skill to create and deploy Dynatrace automation workflows (anomaly detection, alerting, scheduled DQL actions) for DSOA.
docs/workflows/<workflow-name>/<workflow-name>.yml
docs/workflows/<workflow-name>/readme.md
docs/workflows/<workflow-name>/img/.gitkeep
docs/workflows/README.md (index — update after every new workflow)
Export an existing workflow as reference before writing a new one:
dtctl get workflows -A # list all workflows with IDs
dtctl get workflow <id> -o yaml # export one as a structural template
Typical workflow YAML structure:
# WORKFLOW: <Human-readable title>
# DESCRIPTION: <One-line description>
# OWNER: DSOA Team
# PLUGINS: <comma-separated plugin names>
# TAGS: snowflake, dsoa, <domain>
id: <uuid> # omit on first create; add after dtctl returns the ID
title: "DSOA — <Descriptive Name>"
description: |
<What this workflow does and why>
trigger:
# Option A — scheduled (cron)
schedule:
rule: "0 * * * *"
timezone: UTC
# Option B — event-driven
# event:
# eventType: "davis.problem.opened"
# filter: "event.category == 'AVAILABILITY'"
tasks:
step_query:
name: Query anomaly data
action: dynatrace.automations:run-javascript
input:
script: |
import { queryExecutionClient } from '@dynatrace-sdk/client-query';
export default async function () {
const result = await queryExecutionClient.queryExecute({
body: {
query: `
fetch logs
| filter db.system == "snowflake"
| filter dsoa.run.plugin == "<plugin>"
| summarize count = count(), by: { snowflake.<dim> }
| filter count > 0
`,
requestTimeoutMilliseconds: 30000
}
});
return { anomalyCount: result.result?.records?.length ?? 0, records: result.result?.records };
}
step_notify:
name: Send alert notification
action: dynatrace.slack.connector:send-message
conditions:
- taskId: step_query
condition: "{{ result('step_query').anomalyCount > 0 }}"
input:
channel: "#dsoa-alerts"
message: |
:warning: DSOA anomaly detected
Count: {{ result('step_query').anomalyCount }}
Details: {{ result('step_query').records | dump }}
Apply the same DQL rules as for dashboards (see dynatrace-dashboard.md):
fetch logs, fetch events, or fetch bizevents — not fetch metricssrc/dtagent/plugins/<plugin>.config/instruments-def.yml for correct
metric keys, dimensions, and telemetry typesdb.system == "snowflake" and deployment.environmentWorkflows use the same conversion pipeline as dashboards:
./scripts/tools/yaml-to-json.sh docs/workflows/<name>/<name>.yml > /tmp/<name>.json
jq . /tmp/<name>.json > /dev/null && echo "JSON valid" || echo "JSON INVALID"
Always use -A for structured agent-friendly output.
dtctl apply -A -f /tmp/<name>.json
Record the returned ID and add it to the YAML as id: <uuid> so future
runs update rather than create a duplicate.
dtctl apply -A -f /tmp/<name>.json
dtctl apply -A --dry-run -f /tmp/<name>.json
dtctl apply -A --show-diff -f /tmp/<name>.json
dtctl get workflow <id> -o yaml > /tmp/<name>-current.yaml
1. Read instruments-def.yml for all relevant plugins
2. Export a similar existing workflow as structural reference:
dtctl get workflow <id> -o yaml
3. Write workflow YAML in docs/workflows/<name>/<name>.yml
4. Convert: ./scripts/tools/yaml-to-json.sh ... > /tmp/<name>.json
5. Validate: jq . /tmp/<name>.json
6. Deploy: dtctl apply -A -f /tmp/<name>.json
7. Record returned ID — add it to the YAML as `id: <uuid>`
8. Re-convert and re-deploy with ID so subsequent runs update in place
9. Verify workflow triggers and executes correctly in Dynatrace UI
10. Write docs/workflows/<name>/readme.md (see dashboard-docs skill)
11. Update docs/workflows/README.md index
12. Request screenshots (see dashboard-docs skill)
The dt-oss-aym-mcp MCP server can be used as a reference to:
Prefer dtctl for create/update operations.
Use the MCP server for read/query/exploration.
If the workflow queries telemetry from a plugin that was just modified:
# Rebuild
./scripts/dev/build.sh
# Redeploy to dev-094
./scripts/deploy/deploy.sh test-094 --scope=plugins,config,agents --options=skip_confirm
Wait for at least one collection cycle before testing the workflow trigger.
Create and update dashboard and workflow documentation
Create and update Dynatrace dashboards for DSOA telemetry
Create and update DSOA plugins — full development lifecycle from planning through validation
Review a pull request and process review comments left by others
AI-guided QA walkthrough for DSOA releases. Automates version detection, deployment commands, notebook deployment, and interactive test walkthrough. Use when a QA engineer needs to execute the DSOA release test suite.
Create and update Snowflake synthetic test setups for DSOA telemetry validation