Datadog MCP 服务器
Datadog API 的 MCP 服务器,支持日志搜索、跟踪跨度搜索和跟踪跨度聚合功能。
特征
日志搜索:使用灵活的查询选项从 Datadog 搜索和检索日志
跟踪跨度搜索:使用各种过滤选项搜索分布式跟踪跨度
轨迹跨度聚合:按不同维度聚合轨迹跨度进行分析
工具
search_logs
在 Datadog 中搜索日志
输入:
filterQuery
(可选字符串):用于搜索日志的查询字符串(默认值:“*”)filterFrom
(可选数字):搜索开始时间以 UNIX 时间戳(以秒为单位)(默认值:15 分钟前)filterTo
(可选数字):搜索结束时间为 UNIX 时间戳(以秒为单位)(默认值:当前时间)pageLimit
(可选数字):要检索的最大日志数量(默认值:25,最大值:1000)pageCursor
(可选字符串):用于检索其他结果的分页游标
返回:格式化文本,包含以下内容:
搜索条件(查询条件和时间范围)
找到的日志数量
下一页光标(如果有)
日志详细信息包括:
服务名称
标签
时间戳
地位
留言(截断至 300 个字符)
主持人
重要属性(http.method、http.url、http.status_code、error)
search_spans
在 Datadog 中搜索跟踪跨度
输入:
filterQuery
(可选字符串):用于搜索跨度的查询字符串(默认值:“*”)filterFrom
(可选数字):搜索开始时间以 UNIX 时间戳(以秒为单位)(默认值:15 分钟前)filterTo
(可选数字):搜索结束时间为 UNIX 时间戳(以秒为单位)(默认值:当前时间)pageLimit
(可选数字):要检索的最大跨度数(默认值:25,最大值:1000)pageCursor
(可选字符串):用于检索其他结果的分页游标
返回:格式化文本,包含以下内容:
搜索条件(查询条件和时间范围)
找到的跨度数
下一页光标(如果有)
跨度详细信息包括:
服务名称
时间戳
资源名称
持续时间(秒)
主持人
环境
类型
重要属性(http.method、http.url、http.status_code、error)
aggregate_spans
按指定维度聚合 Datadog 中的跟踪跨度
输入:
filterQuery
(可选字符串):用于过滤聚合跨度的查询字符串(默认值:“*”)filterFrom
(可选数字):以秒为单位的 UNIX 时间戳的开始时间(默认值:15 分钟前)filterTo
(可选数字):以秒为单位的 UNIX 时间戳的结束时间(默认值:当前时间)groupBy
(可选字符串[]):分组依据的维度(例如,[“service”,“resource_name”,“status”])aggregation
(可选字符串):聚合方法 - “count”、“avg”、“sum”、“min”、“max”、“pct”(默认值:“count”)interval
(可选字符串):时间序列数据的时间间隔(仅当类型为“timeseries”时)type
(可选字符串):结果类型,可以是“时间序列”或“总计”(默认值:“时间序列”)
返回:格式化文本,包含以下内容:
聚合结果存储在 buckets 中,每个 buckets 包括:
存储桶 ID
按值分组(如果指定了 groupBy)
根据聚合方法计算的值
附加元数据:
处理时间(已用时间)
请求 ID
地位
警告(如果有)
设置
您需要设置 Datadog API 和应用程序密钥:
从Datadog API 密钥页面获取您的 API 密钥和应用程序密钥
在 datadog-mcp 项目中安装依赖项:
构建 TypeScript 项目:
Docker 设置
您可以使用以下命令使用 Docker 进行构建:
与 Claude Desktop 一起使用
要将其与 Claude Desktop 一起使用,请将以下内容添加到您的claude_desktop_config.json
中:
如果您使用 Docker,您可以像这样配置它:
与 VS Code 一起使用
要在 VS Code 中快速安装,请配置您的设置:
在 VS Code 中打开用户设置 (JSON)(
Ctrl+Shift+P
→Preferences: Open User Settings (JSON)
)添加以下配置:
如果您使用 Docker,您可以像这样配置它:
或者,您可以将其添加到工作区中的.vscode/mcp.json
文件中(不带mcp
键):
如果您使用 Docker,您可以像这样配置它:
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
可以与 Datadog 的监控平台交互,以搜索日志、搜索跟踪跨度并执行跟踪跨度聚合以进行分析。
Related MCP Servers
- AsecurityFlicenseAqualityInteracts with LogSeq via its API.Last updated -108
- -securityFlicense-qualityprovide access to monitor and cluster logs from datadogLast updated -8
- AsecurityAlicenseAqualityProvides advanced system monitoring and file search capabilities for macOS, allowing users to track performance metrics and perform enhanced file searches with content analysis and tagging features.Last updated -23813MIT License
- -securityAlicense-qualityEnables AI assistants to interact with Statsig's feature management and experimentation platform, allowing them to check feature flags, retrieve configurations, get experiment assignments, and log events.Last updated -MIT License