datadog-mcp 4.0.1 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -127,6 +127,7 @@ When running with `--transport=http`:
127
127
  | `monitors` | delete | Alerting | Delete a monitor | `monitors_write` |
128
128
  | `monitors` | mute | Alerting | Mute a monitor | `monitors_write` |
129
129
  | `monitors` | unmute | Alerting | Unmute a monitor | `monitors_write` |
130
+ | `monitors` | top | Alerting | Top N monitors by alert frequency with real monitor names and context breakdown. Groups without context tags are included as "no_context" | `monitors_read` |
130
131
  | `dashboards` | list | Visualization | List all dashboards | `dashboards_read` |
131
132
  | `dashboards` | get | Visualization | Get dashboard by ID | `dashboards_read` |
132
133
  | `dashboards` | create | Visualization | Create a new dashboard | `dashboards_write` |
@@ -146,7 +147,7 @@ When running with `--transport=http`:
146
147
  | `events` | create | Events | Create an event | `events_read` |
147
148
  | `events` | search | Events | Search events with v2 API and cursor pagination | `events_read` |
148
149
  | `events` | aggregate | Events | Client-side aggregation by monitor_name, source, etc. | `events_read` |
149
- | `events` | top | Events | Top N noisiest monitors (convenience wrapper) | `events_read` |
150
+ | `events` | top | Events | Top N event groups by count with generic groupBy support (deployments, configs, alerts, etc.). Groups without context tags are included as "no_context" | `events_read` |
150
151
  | `events` | timeseries | Events | Time-bucketed alert trends (hourly/daily counts) | `events_read` |
151
152
  | `events` | incidents | Events | Deduplicate alerts into incidents with Trigger/Recover pairing | `events_read` |
152
153
  | `incidents` | list | Incidents | List incidents | `incident_read` |
@@ -221,7 +222,26 @@ AI assistants have full control over query limits. The environment variables set
221
222
  | Metrics (timeseries) | 1000 | `pointLimit` | Data points per series (controls resolution) |
222
223
  | General tools | 50 | `limit` | Results to return |
223
224
 
224
- Defaults can be configured via `MCP_DEFAULT_*` environment variables.
225
+ Defaults can be configured via `MCP_DEFAULT_*` environment variables:
226
+
227
+ ```json
228
+ {
229
+ "mcpServers": {
230
+ "datadog": {
231
+ "command": "npx",
232
+ "args": ["-y", "datadog-mcp"],
233
+ "env": {
234
+ "DD_API_KEY": "your-api-key",
235
+ "DD_APP_KEY": "your-app-key",
236
+ "MCP_DEFAULT_LIMIT": "50", // General fallback for most tools
237
+ "MCP_DEFAULT_LOG_LINES": "200", // Logs search only
238
+ "MCP_DEFAULT_METRIC_POINTS": "1000", // Metrics query timeseries only
239
+ "MCP_DEFAULT_TIME_RANGE": "24" // Default time range in hours
240
+ }
241
+ }
242
+ }
243
+ }
244
+ ```
225
245
 
226
246
  ### Compact Mode (Logs)
227
247
 
@@ -252,42 +272,74 @@ The `diverse` mode normalizes messages (strips UUIDs, timestamps, IPs, numbers)
252
272
 
253
273
  ## Events Aggregation
254
274
 
255
- ### Top Monitors Report (Best for Weekly/Daily Meteo)
275
+ ### Top Monitors Report (Monitor-Specific)
256
276
 
257
- Get top alerting monitors with automatic context breakdown by queue, service, ingress, pod, etc:
277
+ **Use `monitors` tool for monitor alerts with real monitor names:**
258
278
 
259
279
  ```
260
- events({ action: "top", from: "7d", limit: 10 })
280
+ monitors({ action: "top", from: "7d", limit: 10 })
261
281
  ```
262
282
 
263
- Returns nested structure perfect for reports:
283
+ Returns monitors with **real names** (including {{template.vars}}) from monitors API:
264
284
  ```json
265
285
  {
266
286
  "top": [
267
287
  {
268
288
  "rank": 1,
269
- "name": "High number of ready messages",
270
289
  "monitor_id": 67860480,
290
+ "name": "High number of ready messages on {{queue.name}}",
291
+ "message": "Queue {{queue.name}} has {{value}} ready messages",
271
292
  "total_count": 50,
272
293
  "by_context": [
273
- {"context": "queue:state-status_tasks", "count": 30},
274
- {"context": "queue:updated_order_service", "count": 20}
294
+ {"context": "queue:email-notifications", "count": 30},
295
+ {"context": "queue:payment-processing", "count": 20}
275
296
  ]
276
297
  },
277
298
  {
278
299
  "rank": 2,
279
- "name": "Nginx 5XX errors",
280
300
  "monitor_id": 134611486,
301
+ "name": "Nginx some requests on errors (HTTP 5XX) on {{ingress.name}}",
302
+ "message": "Nginx request on ingress {{ingress.name}} contains some errors (HTTP 5XX)",
281
303
  "total_count": 42,
282
304
  "by_context": [
283
- {"context": "ingress:trusk-api", "count": 29},
284
- {"context": "ingress:backoffice", "count": 13}
305
+ {"context": "ingress:api-gateway", "count": 29},
306
+ {"context": "ingress:admin-panel", "count": 13}
285
307
  ]
286
308
  }
287
309
  ]
288
310
  }
289
311
  ```
290
312
 
313
+ ### Top Events Report (Generic)
314
+
315
+ **Use `events` tool for any event type** (deployments, configs, custom events):
316
+
317
+ ```
318
+ events({ action: "top", from: "7d", limit: 10, groupBy: ["service"] })
319
+ ```
320
+
321
+ Returns event groups by custom fields:
322
+ ```json
323
+ {
324
+ "top": [
325
+ {
326
+ "rank": 1,
327
+ "service": "api-server",
328
+ "message": "Deployment completed",
329
+ "total_count": 30,
330
+ "by_context": [
331
+ {"context": "env:prod", "count": 20},
332
+ {"context": "env:staging", "count": 10}
333
+ ]
334
+ }
335
+ ]
336
+ }
337
+ ```
338
+
339
+ **Key Differences:**
340
+ - `monitors top`: Fetches real monitor names from monitors API (slower, monitor-specific)
341
+ - `events top`: Fast generic grouping, returns event message text (any event type)
342
+
291
343
  Context tags are auto-extracted: `queue:`, `service:`, `ingress:`, `pod_name:`, `kube_namespace:`, `kube_container_name:`
292
344
 
293
345
  ### Tag Discovery