Design and Architecture
![](https://i0.wp.com/myfuturehub.com/wp-content/uploads/2023/04/Grafana.png?resize=371%2C281&ssl=1)
Problem Statement – Configure Monitoring alerts to grafana from cloudwatch metrics
Status – POC Completed
Solution : Implement Grafana with Cloudwatch metrics
Steps :
- Create a EC2 server into AWS console(Recommended Ubuntu OS)
- Install docker into it (Reference : https://docs.docker.com/engine/install/ubuntu/)
- Configure Grafana container into it using below command (docker run -d –restart always –name=grafana -p 3000:3000 grafana/grafana)
![](https://i0.wp.com/myfuturehub.com/wp-content/uploads/2023/04/image-42.png?resize=1024%2C123&ssl=1)
- Expose 3000 port from EC2 machine
- Open the IP with :3000
![](https://i0.wp.com/myfuturehub.com/wp-content/uploads/2023/04/image-43.png?resize=1024%2C497&ssl=1)
- Default credentials for grafana would be admin:admin
- You can set the password which you like
- From AWS IAM create a user with programmatic access which is having Cloudwatch Full Access.
![](https://i0.wp.com/myfuturehub.com/wp-content/uploads/2023/04/image-44.png?resize=1024%2C483&ssl=1)
- In Grafana, Go to Configuration > Data Sources > Add new Data Source.
- Add Your Data Source name, Access Key, Secret Key, and Default region.
- Click on Test and Save.
![](https://i0.wp.com/myfuturehub.com/wp-content/uploads/2023/04/image-45.png?resize=1024%2C257&ssl=1)
- From Grafana dashboard find the Dashboard according to your usecase. (Link : https://grafana.com/grafana/dashboards/)
- Go to Dashboards > Import > Add Dashboard ID you found from above link and select your datasource.
- You will be able to see the dashboard as below
![](https://i0.wp.com/myfuturehub.com/wp-content/uploads/2023/04/image-46.png?resize=1024%2C496&ssl=1)