К основному содержанию
скилл CX Codex

dt-obs-ext-monitors — скилл для Claude Code: что делает

Скилл настраивает отправку результатов внешних проверок и CI-мониторинга в Dynatrace Grail через API событий. Пригодится при замене устаревшего эндпоинта synthetic v1.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add Dynatrace/dynatrace-for-ai --skill dt-obs-ext-monitors -a claude-code
Открыть на GitHub

Что делает dt-obs-ext-monitors

Скилл передаёт схему событий для отправки синтетических проверок и тестов сторонних сервисов в Dynatrace Grail. Обращения идут к API /platform/ingest/custom/events/{endpoint} вместо устаревшего POST /api/v1/synthetic/ext/tests. Конвейер OpenPipeline автоматически регистрирует идентификатор test.id как узел EXT_TEST в топологии Smartscape, что связывает сбои Davis Problems с конкретной сущностью.

Внутри собраны форматы событий external_test_run и external_test_step, примеры вызовов curl и DQL-запросы для проверки записей в Grail. Отправка сломается, если передать объект вместо JSON-массива или попытаться использовать токен со скоупом events.ingest. Для Classic Api-Token нужен openpipeline.events.custom, а для Platform Token — openpipeline:events.custom:ingest. Перед началом работы эндпоинт приёма должен быть заранее создан в OpenPipeline.

Какие задачи решает

  • настроить отправку результатов внешних проверок в Dynatrace Grail
  • привязать сторонние проверки к графу топологии Smartscape через EXT_TEST
  • составить валидный JSON-массив событий external_test_run и external_test_step
  • проверить принятые события тестов с помощью запроса DQL

Примеры запросов агенту

  • Покажи схему события external_test_run для отправки тестов из GitHub Actions в Dynatrace
  • Как отправить результаты внешнего мониторинга в Dynatrace Grail через curl?
  • Напиши DQL-запрос для проверки результатов внешних тестов за последний час

Как установить dt-obs-ext-monitors

1Через Skills CLI (Vercel)

npx skills add Dynatrace/dynatrace-for-ai --skill dt-obs-ext-monitors -a claude-code

2Вручную: положить файлы

~/.claude/skills/dt-obs-ext-monitors/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/dt-obs-ext-monitors/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора29

dt-obs-genai Помогает анализировать телеметрию LLM-приложений через Dynatrace DQL. Пригодится для отслеживания ошибок моделей, расхода токенов и сбоев в вызовах инструментов агентов. CX Codex +1 1 400установок dt-sec-insights Скилл для запросов к данным безопасности Dynatrace на языке DQL: уязвимости, атаки, соответствие требованиям и покрытие сканированием. CX Codex +1 1 400установок dt-obs-log-semantic-mapping Скилл сопоставляет поля аудит-логов вендора с семантическим словарём Dynatrace и проверяет готовую схему. CX Codex +1 1 400установок dt-platform-costs Анализирует фактическое потребление и расходы тенанта Dynatrace по модели DPS через DQL. Помогает найти главные драйверы трат и распределить расходы по командам. CX Codex +1 1 400установок dt-sec-ioc-hunting Ищет индикаторы компрометации из отчётов и адвизори в логах и спанах Dynatrace и считает оценку подверженности угрозе от 0 до 100. CX Codex +1 1 000установок dt-obs-network-flows Скилл для Dynatrace: разбирает сетевые потоки из трёх источников и отвечает, кто с кем говорит и где рвутся соединения. CX Codex +1 912установок dt-obs-network-devices Скилл разбирает данные SNMP-мониторинга в Dynatrace: инвентарь устройств, состояние интерфейсов, топологию и логи. Пригодится, когда надо найти упавший порт или перегруженный коммутатор. CX Codex +1 907установок dt-obs-compliance-assistant Отслеживает соответствие регламенту EU DORA через Dynatrace Compliance Assistant. Помогает оценивать compliance score, состояние CIF и инциденты. CX Codex +1 889установок

Похожие

dtctl Dynatrace Управляет Dynatrace через CLI: исследует инциденты, логи, трассировки и состояние сервисов. Пригодится для запросов DQL и работы с дашбордами. CX Codex +1 1 300установок dd-monitors datadog-labs Скилл для работы с мониторами Datadog: список, поиск, создание из файла и правила алертинга без ложных срабатываний. CX Codex +1 1 900установок Dynatrace Expert официальный github Субагент подключает наблюдаемость и безопасность Dynatrace прямо к рабочим процессам в репозитории. Он разбирает инциденты, валидирует релизы и ищет уязвимости по логам и спанам. ★ 40 418звёзд репо synthetic-monitoring-checks grafana Пишет проверки Grafana Cloud Synthetic Monitoring: скриптовые на k6 и браузерные. Пригодится, когда нужно следить за доступностью логина или оформления заказа из разных регионов. CX Codex +1 2 300установок cloud-network-insights официальный google Скилл помогает подключить Cloud Network Insights, настроить синтетический мониторинг AppNeta и проверить сетевые и веб-пути. Пригодится для работы с Monitoring Points в облаке или на своей инфраструктуре. CX Codex 78установок

Рядом в теме «Тесты и QA»

Всё по теме «Тесты и QA» →

Вопросы о dt-obs-ext-monitors

Как установить dt-obs-ext-monitors в Claude Code?

Выполните команду npx skills add Dynatrace/dynatrace-for-ai --skill dt-obs-ext-monitors -a claude-code.

Зачем нужен скилл dt-obs-ext-monitors?

Он помогает настроить приём данных внешних тестов в Dynatrace Grail взамен устаревшего метода POST /api/v1/synthetic/ext/tests. Скилл описывает схему событий OpenPipeline и правила связывания метрик с топологией Smartscape.

Какие права и токены требуются для отправки событий?

Скоуп events.ingest здесь не сработает. Для Classic Api-Token требуется право openpipeline.events.custom, а для Platform Token или OAuth нужен скоуп openpipeline:events.custom:ingest.

Исходный текст

SKILL.md · Apache-2.0
---
name: dt-obs-ext-monitors
description: >-
  3rd-party test and monitor result ingestion into Dynatrace Grail via the platform events
  ingest API (platform/ingest/custom/events/). Use when sending external synthetic test outcomes,
  CI monitor data, or third-party check results to Dynatrace. Covers token scope, full event
  schema for external_test_run and external_test_step (including dt.security_context, ci.*,
  trace correlation, and pipeline-added fields), curl and Java DTO examples, and DQL verification.
  Triggers: "ingest test results", "send monitor results", "third party monitor",
  "external test ingestion", "send synthetic results to Grail", "external test run event schema".
  Not for Dynatrace-native Synthetic Monitoring browser/HTTP checks, or RUM (use dt-obs-frontends).
  For migrating from the deprecated POST /api/v1/synthetic/ext/tests API, load dt-upgrade instead.
license: Apache-2.0
---

# External Monitor Ingestion

Send 3rd-party test and monitor results to Dynatrace Grail using the events ingest API.
This is the canonical replacement for the deprecated `POST /api/v1/synthetic/ext/tests` endpoint.

## Overview

Events posted to `/platform/ingest/custom/events/{endpoint}` land in Grail and are processed
by OpenPipeline, which:

- Extracts metrics (`external.test.availability`, `external.test.duration`) for alerting and SLOs
- Registers each unique `test.id` as an `EXT_TEST` Smartscape node — enabling Davis Problems to
  attach to a named entity ("External test X went down") rather than floating without topology context
- Adds `result.status.category` to step events (`SUCCESS` / `SKIPPED` / `FAIL`) for dashboard filtering

Two event types form a test result:

| Type | Purpose |
|------|---------|
| `external_test_run` | Overall pass/fail result for one test execution |
| `external_test_step` | One step within that run (optional; enables step-level metrics) |

## Authentication

Two token types are accepted:

| Token type | Scope |
|------------|-------|
| Classic Api-Token | `openpipeline.events.custom` |
| Platform Token / OAuth | `openpipeline:events.custom:ingest` |

Common wrong guess that does NOT work: `events.ingest`.

## Quick Start

> **Prerequisite:** The ingest endpoint must be created in OpenPipeline before sending events.
> The `external.tests` endpoint is provisioned automatically by the
> default Dynatrace 3rd-party monitors Monaco bundle.
> See `references/event-ingestion.md` for setup details and custom endpoint creation.

Send one minimal test result (replace `external.tests` with your configured endpoint name):

```text
curl -X POST "https://{env-id}.live.dynatrace.com/platform/ingest/custom/events/external.tests" \
  -H "Authorization: Api-Token {token}" \
  -H "Content-Type: application/json" \
  -d '[{
    "event.kind": "EXTERNAL_TEST_EVENT",
    "event.type": "external_test_run",
    "test.id": "my-api-health-check",
    "test.run.id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "test.name": "My API Health Check",
    "test.type": "api",
    "test.run.status": "passed",
    "test.run.availability": 1,
    "test.run.duration_ms": 245,
    "test.run.location": "us-east-1",
    "dt.security_context": "team-checkout",
    "timestamp": "2024-01-15T10:30:00Z"
  }]'
```

**Expected response:** HTTP 200 (empty body).

> Full event schema, step events, extended examples with error fields and CI metadata,
> Java DTO shapes, and DQL queries: `references/event-ingestion.md`

## Verify in Grail

After sending, confirm the event appears:

```dql
fetch events, from:now()-1h
| filter event.type == "external_test_run"
| fields timestamp, test.id, test.name, test.run.status, test.run.duration_ms, test.run.location
| sort timestamp desc
| limit 20
```

## Key Constraints

- Body **must** be a JSON array (`[{...}]`), not an object wrapper (`{"events":[...]}`).
- A single request can mix run events and step events in the same array.
- `timestamp` must be ISO 8601 UTC (e.g. `"2024-01-15T10:30:00Z"`).
- `test.run.availability` must be integer `1` or `0`, not a string.
- All step events in a run must share the same `test.run.id` and `test.id` as the parent run event.
- Step events must include `test.step.id` (unique within the run) in addition to `test.run.id`.
- `event.kind: "EXTERNAL_TEST_EVENT"` must be present — used by Grail for event classification.
  Routing to the correct pipeline is driven by `event.type`, not `event.kind`.
- Do **not** send `dt.smartscape.ext_test` or `result.status.category` — these are written by
  the pipeline after ingestion and will be overwritten if included.
- `dt.security_context` controls data access policies; it’s recommended to set it on every event to enable
  per-team access control and cost attribution in multi-team tenants.

## Multi-Location Tests

Send the same `test.id` from multiple locations — each with a different `test.run.location`
value — to build a multi-location test. OpenPipeline creates one `EXT_TEST` node per `test.id`
and one availability metric timeseries per `(test.id, location)` pair.

This enables two alerting tiers out of the box:

| Alert type | Fires when |
|------------|-----------|
| Local outage | A single location's availability drops (per-location timeseries) |
| Global outage | Average across all locations drops below threshold (e.g. majority failing) |

Threshold maths for a 3-location test: 1 location failing → avg 0.67 (no alert at 0.5 threshold);
2 failing → avg 0.33 (fires); all 3 failing → avg ≈ 0 (fires immediately).

Keep `test.id` stable across all locations — changing it creates a new Smartscape node and
breaks metric history.

## Related Skills

- **dt-dql-essentials** — DQL syntax for querying ingested events and building analysis queries
- **dt-obs-frontends** — Link test runs to frontend entities via `dt.smartscape.frontend` to
  draw EXT_TEST → FRONTEND dependency edges in Smartscape

© Dynatrace · Apache-2.0 · Dynatrace/dynatrace-for-ai

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой