dynatrace_managed_query_metrics_data
Retrieve performance metrics for a specific time range and selector. Narrow the query with entity IDs, a limited timerange, and matching resolution to get focused data.
Instructions
Query metric data for a specific time range and metric selector. Must limit the amount of data being retrieved: must use a specific entitySelector, such as using specific entityIds; must use a narrow timerange (with from and to); must use a resolution in line with the timerange, for example if getting data covering several days then the resolution should be hours rather than minutes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | End time (ISO format or relative like "now") | |
| from | Yes | Start time (ISO format or relative like "now-1h") | |
| resolution | No | Data resolution. Use a bigger resolution when the timerange is larger. For example, use "5m" for detailed analysis of data over hour(s), use "1h" for trends of data over a day, use 6h or 1d for data over many days. | |
| entitySelector | No | Entity selector to filter metrics data. CRITICAL: Only ONE entity type per query. Use discover_entities() first to get exact names/IDs, then use entityId("exact-id") or type(SERVICE),entityName.equals("exact-name"). Examples: entityId("SERVICE-123"), type(SERVICE),entityName("payment-service"), type(AWS_LAMBDA_FUNCTION),tag("AWS_REGION:us-west-2") | |
| metricSelector | Yes | Metric selector (e.g., "builtin:service.response.time" for latency, "builtin:tech.generic.cpu.usage" for container CPU, "builtin:host.mem.usage" for memory). Consider first using the tool list_available_metrics to identity the right metric. | |
| environment_alias | Yes | Specify which environment to be queried, by supplying the environment alias as returned by get_environments_info. Can use `ALL_ENVIRONMENTS` to retrieve data from all environments in one request to MCP. |