Em *_* Ae 5 amazon-web-services aws-cloudformation amazon-cloudwatch aws-api-gateway
我有一个 api 说apifortest,它在不同的路径下有 10 种方法。这些方法是GET,PUT和POST。我想要做的是为这些创建一个 CloudWatch 监视器。
我在这里查看文档
http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/api-gateway-metrics-dimensions.html
这是我之前的
TestApiCloudWatch:
Type: "AWS::CloudWatch::Alarm"
Properties:
ActionsEnabled: "True"
AlarmName: "ApiGateway-TestAPI-5XXError-SEV2"
ComparisonOperator: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, ComparisonOperator]
Dimensions:
-
Name: "ApiName"
Value: "APIForTest"
-
Name: "Stage"
Value: "Prod"
EvaluationPeriods: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, EvaluationPeriods]
MetricName: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, MetricName]
Namespace: "AWS/ApiGateway"
Period: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, Period]
Statistic: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, Statistic]
Threshold: !FindInMap [APIGatewayCloudWatchMappings, 5XXError-SEV2, Threshold]
Run Code Online (Sandbox Code Playgroud)
但是这个警报是在 API 级别设置的。我想在方法级别进行设置。文档确实说明我们可以这样做,但它没有任何示例。
任何帮助,将不胜感激。
该文档列出了您需要使用的尺寸:
| 归档时间: |
|
| 查看次数: |
1743 次 |
| 最近记录: |