跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Dynatrace,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
通过 Environment API v2 使用 Dynatrace 可观测性:带根因和影响分析的 Davis 问题,受监控实体和标签,指标查询,日志搜索,事件,安全问题,SLO,设置和审计日志。AI 还可以评论问题、发送部署事件和自定义事件,并为实体打标签。
试试这样问
Dynatrace 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Dynatrace、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Dynatrace + Meta Muse
通过 Environment API v2 使用 Dynatrace 可观测性:带根因和影响分析的 Davis 问题,受监控实体和标签,指标查询,日志搜索,事件,安全问题,SLO,设置和审计日志。AI 还可以评论问题、发送部署事件和自定义事件,并为实体打标签。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
DYNATRACE_ENVIRONMENT_URL, DYNATRACE_API_TOKEN
步骤 1 — 获取凭证
设置大约需要 3 分钟。你需要一个 Dynatrace SaaS 或 Managed 环境。
DYNATRACE_ENVIRONMENT_URL是经典的环境地址:SaaS 为https://<environment-id>.live.dynatrace.com,Managed 为https://<your-domain>/e/<environment-id>,不带/api,末尾也不加斜杠。平台地址(<environment-id>.apps.dynatrace.com)不接受这种令牌;请使用同一环境的live地址。- 在 Dynatrace 中打开 Access tokens(Manage、Access tokens、Generate new token),勾选工具需要的范围:
problems.read、entities.read、metrics.read、logs.read、events.read、securityProblems.read、slo.read、settings.read、auditLogs.read;如需写入,再加上problems.write(评论、关闭)、events.ingest和entities.write(标签)。个人访问令牌的用法相同。 - 把令牌(
dt0c01.XXXX.YYYY,前面不加Api-Token)粘贴到DYNATRACE_API_TOKEN,然后运行dynatrace_list_problems进行检查。平台令牌(dt0s16)不能用于此 API。
问题:dynatrace_list_problems 配合 problem_selector: status("OPEN") 列出 Davis AI 检测到的问题。dynatrace_get_problem 配合 fields: evidenceDetails,impactAnalysis 给出证据、根因、影响和受影响的实体。dynatrace_list_problem_comments 读取评论,dynatrace_add_problem_comment 添加评论,例如找到的原因或已创建的工单。
拓扑:dynatrace_list_entity_types 和 dynatrace_get_entity_type 说明实体类型及其属性。dynatrace_list_entities 通过实体选择器(例如 type("SERVICE"),entityName.contains("checkout"))查找主机、服务、进程、应用、Kubernetes 工作负载和云资源,dynatrace_get_entity 显示属性、标签、管理区域和关系。dynatrace_list_tags 读取自定义标签;dynatrace_add_tags 为所有匹配的实体添加标签,已有标签保持不变。
指标和日志:dynatrace_list_metrics(用 text 搜索)和 dynatrace_get_metric 查找指标键、单位和维度;dynatrace_query_metrics 读取数据点,每个选择器最多 10 个指标。dynatrace_aggregate_logs 按时间段和属性统计日志记录,显示错误集中在哪里,然后 dynatrace_search_logs 返回具体记录,每次最多 1000 条。
事件、安全、SLO 和审计:dynatrace_list_events、dynatrace_get_event 和 dynatrace_list_event_types 读取事件;dynatrace_ingest_event 在实体上记录部署、配置变更或注释。dynatrace_list_security_problems 配合 status("OPEN"),riskLevel("CRITICAL","HIGH") 以及 dynatrace_get_security_problem 显示漏洞及其 CVE、风险评估和受影响的实体。dynatrace_list_slos 配合 evaluate: true 以及 dynatrace_get_slo 给出状态、错误预算和消耗速率。dynatrace_list_audit_logs 显示谁改了什么。设置只读:dynatrace_list_settings_schemas、dynatrace_get_settings_schema、dynatrace_list_settings_objects 和 dynatrace_get_settings_object。
写入之前:发送的告警、错误或可用性事件可能会打开问题并通知相关人员;评论和标签对环境中的所有人可见。因此 AI 会先展示改动,等你确认。
安装时关闭:dynatrace_close_problem。关闭的问题无法重新打开(故障再次出现时 Dynatrace 会新开一个问题),所以在团队需要时由工作区管理员开启。
选择器:实体选择器形如 type("HOST"),tag("env:prod"),mzName("Production");用逗号连接的条件表示“且”,值区分大小写。问题、事件、SLO 和安全问题的选择器用法相同。指标选择器可以串联转换:builtin:service.response.time:splitBy("dt.entity.service"):avg:sort(value(avg,descending)):limit(10)。
数据格式:时间是自 1970 年起的 UTC 毫秒数(startTime、endTime、timestamp;-1 表示仍未结束)。时间范围可以用相对值(now-2h、now-7d)、毫秒或 ISO 8601;默认通常是最近 2 小时,审计日志为最近 2 周。响应时间单位为微秒,CPU 和内存使用率为百分比,字节数为字节;dynatrace_get_metric 会给出单位。实体 id 形如 HOST-1234ABCD5678EF90;问题的 id 与其显示 id(P-2410123)不同。
分页:列表返回 nextPageKey;AI 只带 next_page_key、去掉其他所有筛选条件再次调用,直到它不再出现。日志搜索用 nextSliceKey 分页,仅适用于经典日志存储;在 Grail 环境中,AI 会改为缩小时间范围。时间范围越短,响应越小。
常见错误:401 表示令牌错误、过期、已撤销,或使用了平台令牌;403 表示令牌缺少调用所需的范围(消息会指出);404 表示 id 未知或环境地址错误;400 表示选择器格式有误(消息会指出位置);429 表示触发速率限制,请稍等后重试。
该连接器不运行 Grail 或 DQL 查询:它们需要平台令牌或 OAuth 客户端,而不是访问令牌,由 Dynatrace Remote MCP 服务器提供。它也不会修改设置或删除标签。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Muse 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Muse 以自定义连接器的形式添加远程 MCP 服务器,并通过 OAuth 登录。
- 在 Muse 中打开 Settings → Connectors,选择 Add custom connector。
- 粘贴 MCP 服务器 URL
https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。 - Muse 会打开 AnythingMCP 的登录页面:登录并批准访问。
- 在聊天中,向 Muse 提出需要用到
Dynatrace的工具的请求。
你也可以在聊天中完成设置,适用于网页版、iOS 和 Android 应用以及 WhatsApp。给 Muse 发送这条消息:
Create a Custom Connector for a new remote MCP server, then connect to it:
Name: AnythingMCP
Transport: remote streamable HTTP
URL: https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID
Auth: OAuth
自托管?请用你实例的公网 HTTPS 地址替换 https://cloud.anythingmcp.com。Muse 从 Meta 的云端连接,因此 localhost 无法使用。
可用工具
| Tool | What it does |
|---|---|
dynatrace_list_problems | List problems (Davis AI detected incidents), newest first: id, display id (P-2410123), title, impact level (APPLICATION, SERVICE… |
dynatrace_get_problem | Get one problem with its evidence (the events, metrics and transactions Davis used), impact analysis, root cause, affected entities, linked… |
dynatrace_list_problem_comments | List the comments on a problem: text, context (e.g. the tool that wrote it), author and time |
dynatrace_add_problem_comment | Add a comment to a problem, e.g. the cause found or the ticket opened |
dynatrace_close_problem | Close an open problem by hand, with a closing comment |
dynatrace_list_entities | List monitored entities (hosts, services, processes, applications, Kubernetes workloads, cloud resources and so on) that match an entity… |
dynatrace_get_entity | Get one monitored entity with its type, display name, properties, tags, management zones, first and last seen time and its relationships to… |
dynatrace_list_entity_types | List the entity types of the environment (HOST, SERVICE, PROCESS_GROUP, APPLICATION, KUBERNETES_CLUSTER, CLOUD_APPLICATION and many more)… |
dynatrace_get_entity_type | Get one entity type with its properties (usable in fields and selectors), the relationships it can have and its tag and management zone… |
dynatrace_list_tags | List the custom tags on the entities that match an entity selector, with key, value and how often each is used |
dynatrace_add_tags | Add custom tags to every entity that matches an entity selector, e.g. owner:team-payments |
dynatrace_list_metrics | List the available metrics with key (e.g. builtin:host.cpu.usage), display name, description, unit, aggregation types and dimensions |
dynatrace_get_metric | Get the descriptor of one metric: display name, description, unit, dimensions, aggregation types, default aggregation and entity type |
dynatrace_query_metrics | Read metric data points: one or more metrics with transformations (:avg, :splitBy("dt.entity.host"), :sort(value(avg,descending))… |
dynatrace_search_logs | Search log records with the Dynatrace log search query language: timestamp, status (ERROR, WARN, INFO, NONE), content and attributes (host… |
dynatrace_aggregate_logs | Count log records over time and by attribute: how many records match a query per time slot and per value of the chosen groupings (e.g.… |
dynatrace_list_events | List events (deployments, configuration changes, availability, error, performance and resource events, custom events) with type, title… |
dynatrace_get_event | Get one event with all its properties, the entity it belongs to and its management zones |
dynatrace_list_event_types | List the event types with their display name and description, for use in an event selector |
dynatrace_ingest_event | Send a custom event to Dynatrace and attach it to entities: a deployment, configuration change or annotation shows on the entities and is… |
dynatrace_list_security_problems | List security problems (vulnerabilities found by Runtime Vulnerability Analytics): id, display id (S-123), title, status (OPEN, RESOLVED… |
dynatrace_get_security_problem | Get one security problem with its description, CVEs, risk assessment (exposure, data assets, public exploit), affected and related entities… |
dynatrace_list_slos | List service-level objectives with name, target and warning thresholds, timeframe and, with evaluate, the current status (percentage)… |
dynatrace_get_slo | Get one SLO with its definition and its evaluated status, error budget, burn rate and the metric expression behind it |
dynatrace_list_settings_schemas | List the settings schemas of the environment (e.g. builtin:alerting.profile, builtin:management-zones, builtin:problem.notifications… |
dynatrace_get_settings_schema | Get one settings schema: its properties, types, allowed values, scopes and constraints |
dynatrace_list_settings_objects | Read the configured settings objects of one or more schemas (alerting profiles, management zones, anomaly detection, notifications and so… |
dynatrace_get_settings_object | Read one settings object with its schema, scope, value and modification details |
dynatrace_list_audit_logs | List the audit log: who changed what and when (configuration changes, token changes, logins), with user, category, event type, entity and… |
示例提示
- “生产环境中现在有哪些未关闭的问题?Davis 认为根因是什么?”
- “给我看最近 24 小时平均响应时间最高的 5 个服务。”
- “最近一小时 checkout 日志里有没有错误激增?给我看几条示例记录。”
- “在 checkout 服务上记录一次 1.4.2 版本的部署。发送前先给我看事件内容。”
- “哪些严重或高风险的安全问题仍未解决?它们影响哪些实体?”
FAQ
Muse 在哪些地区可用? Meta 目前在美国和加拿大提供 Muse,可在网页版、iOS 和 Android 应用以及 WhatsApp 中使用。
Meta 会审核这个连接器吗? 不会。Meta 不审核自定义连接器。Muse 只能看到你在 AnythingMCP 中为此 MCP 服务器启用的工具,你也可以随时在 Settings → Connectors 中断开它。
下一步
这份指南对你有帮助吗?