【发布时间】:2014-09-12 19:15:37
【问题描述】:
我正在使用最新版本的适用于 JavaScript 的 AWS 开发工具包。
我需要使用 getMetricStatistics 方法 (http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudWatch.html#getMetricStatistics-property) 从 AWS Cloudwatch 获取一些指标。要使用此方法,您需要指定 Dimensions 字段。
如果我这样指定尺寸,效果很好:
{Name: 'InstanceId', Value: SOME_INSTANCE_ID_HERE}
但是对于 Elastic Beanstalk,您不能依赖 InstanceId,因为它可能会在需要时创建/销毁实例。所以我尝试使用不同的维度:
{Name: 'InstanceName', Value: NAME_FROM_ELB}
但它不起作用。我正在尝试寻找另一种方式/维度来访问 ELB 指标。
【问题讨论】:
-
我不知道这个问题的答案,但您可能还想将其交叉发布到:forums.aws.amazon.com
标签: amazon-web-services amazon-ec2 amazon-cloudwatch amazon-elastic-beanstalk