How to Create & Configure CloudWatch dashboard on Amazon Web Service(AWS).

Amazon CloudWatch is a monitoring and management service that provides data and actionable insights for AWS, hybrid, and on-premises applications and infrastructure resources. With CloudWatch, you can collect and access all your performance and operational data in form of logs and metrics from a single platform.

Amazon CloudWatch is basically a metrics repository. An AWS service—such as Amazon EC2—puts metrics into the repository, and you retrieve statistics based on those metrics.You can use metrics to calculate statistics and then present the data graphically in the CloudWatch console.

 

  • Login to aws portal.
  • Click on Services.

 

Fig 1

 

  • Under Management & Governance select CloudWatch.

 

Fig 2

 

  • Click on Dashboards.

 

Fig. 3

 

  • Click on Create Dashboard.

 

Fig. 4

 

  • Provide Dashboard name.
  • Click on Create dashboard.

 

Fig. 5

 

  • To add a line, number, text or Stacked area to your dashboard.
  • Click on Next.

 

Fig. 6

 

  • Select data source:metrics or logs.
  • Click on Configure.

 

Fig. 7

 

  • Select Metics :EC2,ELB,RDS or CodeBuild.
  • Choose EC2.

 

Fig. 9

 

  • Select Metric name & instance-ID.
  • Click on Create Widget.

 

Fig 10

 

  • Click on Save dashboard.

 

Fig 11

 

Create Cloudwatch Dashboard using Shell

aws cloudwatch put-dashboard –dashboard-name cli-dashboard –dashboard-body file.json(/path/of/json/file)

The file is a JSON format is given below:

{
“start”: “-PT6H”,
“periodOverride”: “inherit”,
“widgets”: [
{
“type”:”metric”,
“x”:0,
“y”:0,
“width”:12,
“height”:6,
“properties”:{
“metrics”:[
[
“AWS/EC2”,
“CPUUtilization”,
“InstanceId”,
“i-012345”
]
],
“period”:300,
“stat”:”Average”,
“region”:”us-east-1″,
“title”:”EC2 Instance CPU”,
“liveData”: false,
“legend”: {
“position”: “right”
}
}
},
{
“type”:”text”,
“x”:0,
“y”:7,
“width”:3,
“height”:3,
“properties”:{
“markdown”:”example”
}
}
]
}

Leave a Reply