I am creating a beanstalk using the CDK and after than I would like to create the cloudwatch dashboard on the same the stalk to view the beanstalk metrics. How can I get the beanstalk loadbalancer details using CfnEnvironment?
const dashboardBody = {
widgets:[
{
"type": "metric",
"width": 24,
"height": 3,
"properties": {
"title": "Request Count",
"metrics": [
[
"AWS/ApplicationELB",
"RequestCount",
"LoadBalancer",
***"<<Loadbalancer Name>>"***
]
],
"region": "<<AWS Region>>",
"stat": &quo开发者_如何学运维t;Sum",
"yAxis": {
"left": {
"min": 0
}
}
}
}
]
}
const dashobard = new cdk.aws_cloudwatch.CfnDashboard(this, 'dashboard', {
dashboardName: 'dashboard',
dashboardBody: JSON.stringify(dashboardBody)
})
精彩评论