Version 4.43 or later needs to be installed to add the server automatically
Tools
| Name | Description |
|---|---|
execute_promql_query | Execute an instant PromQL query against CloudWatch. Returns the current value of metrics at a single point in time (instant vector). For time series over a range, use execute_promql_range_query instead. Use this tool when: - The user provides a PromQL expression - The user references OTLP-ingested metrics or labels (@resource.*, @aws.*, @instrumentation.*) - The user asks about enriched vended AWS metrics with OTel labels - The user wants to query by AWS resource tags (@aws.tag.*) Use get_metric_data instead when: - The user references classic CloudWatch namespaces/dimensions (AWS/EC2, etc.) - The user wants Metrics Insights SQL syntax PromQL label conventions (OTLP scope to label mapping): - @resource.{attr} - OTel resource attributes (e.g., @resource.service.name="myservice") - @instrumentation.{attr} - instrumentation scope (e.g., @instrumentation.@name="cloudwatch.aws/ec2") - @datapoint.{attr} or bare - datapoint attributes / CW dimensions (e.g., InstanceId="i-xxx") - @aws.account_id, @aws.region - AWS system labels - @aws.tag.{Key} - AWS resource tags (e.g., @aws.tag.Environment="production", @aws.tag.Team="backend") For enriched vended AWS metrics, use histogram functions (OTel enrichment must be enabled first: `aws cloudwatch start-otel-enrichment`): - histogram_avg({CPUUtilization, "@instrumentation.@name"="cloudwatch.aws/ec2"}) - histogram_sum({Invocations, FunctionName="my-func"}) Limits: max 500 series returned, 7-day range, 20s timeout. Example queries: - {"http.server.active_requests", "@resource.service.name"="myservice"} - histogram_avg({CPUUtilization, "@instrumentation.@name"="cloudwatch.aws/ec2"}) - sum by ("@aws.tag.Team")(histogram_sum({Invocations, "@instrumentation.@name"="cloudwatch.aws/lambda"})) |