【问题标题】:How do I disable detailed monitoring for instances in an auto scaling group in a CloudFormation template?如何在 CloudFormation 模板中禁用对 Auto Scaling 组中实例的详细监控?
【发布时间】:2012-08-03 23:05:22
【问题描述】:

我正在使用 CloudFormation 启动 Auto Scaling 组中的一些服务器,我希望它们都使用基本监控。我尝试在AWS::AutoScaling::AutoScalingGroup 属性以及AWS::AutoScaling::LaunchConfiguration 中将Monitoring 设置为false,但堆栈无法启动;我看到CREATE_FAILED 带有错误消息:Encountered unsupported property Monitoring

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation


    【解决方案1】:

    在几乎但不完全一致的 CFN 模板语法的可爱无赖世界中又过了一天。

    您想要的属性是InstanceMonitoring,而不是Monitoring。它应该适用于您的 LaunchConfiguration 资源。更多详情in the docs.

    InstanceMonitoring
    
    Indicates whether or not instance monitoring should be enabled for this
        autoscaling group. This is enabled by default. To turn it off, set
        InstanceMonitoring to "false".
    
    Required: No. Default value is "true".
    Type: Boolean
    

    当然,如果您要预置 AWS::EC2::Instance 资源,则直接使用 Monitoring。值得一提的是,在将实例声明移入和移出 VPC 时,我发现这比将 SecurityGroups 更改为 SecurityGroupIds 稍微不那么烦人,但这只是我个人的情况。

    【讨论】:

      猜你喜欢
      • 2015-08-28
      • 2012-12-25
      • 2016-10-29
      • 1970-01-01
      • 2013-03-28
      • 2016-12-25
      • 2018-09-15
      • 2017-10-07
      • 2018-07-27
      相关资源
      最近更新 更多