【发布时间】:2020-02-13 10:00:53
【问题描述】:
我正在尝试将小部件添加到 yaml 中我的云形成模板中的仪表板。我正在努力做到这一点,以便对于部署的每个堆栈,它将自动为此主仪表板创建一个小部件以帮助监控。但是,每当我部署时,它都会显示仪表板“已经存在”然后失败。我想简单地添加到这个现有的仪表板。
AutoScalingDashboardMetrics:
Type: AWS::CloudWatch::Dashboard
Properties:
DashboardBody: !Sub |
{
"start": "-PT9H",
"periodOverride": "inherit",
"widgets": [
{
"type":"metric",
"properties":{
"metrics": [
[ "AWS/AutoScaling", "GroupTotalInstances", "AutoScalingGroupName", "${AWS::StackName}", { "period": 300 } ],
[ ".", "GroupStandbyInstances", ".", ".", { "period": 300 } ],
[ ".", "GroupDesiredCapacity", ".", ".", { "period": 300 } ]
],
"view": "timeSeries",
"stacked": false,
"region": "{AWS::Region}",
"title": "ASG Instances: ${AWS::StackName}",
"period": 300
}
}
]
}
DashboardName: test
【问题讨论】:
标签: amazon-web-services yaml amazon-cloudformation amazon-cloudwatch amazon-cloudwatch-metrics