Day 73 - Grafana Installation and Setup

Day 73 - Grafana Installation and Setup

In the previous blog, we have seen about Grafana in detail. You can refer this Day 72 - Grafana.✨

So, basically Grafana is a powerful tool used in DevOps for visualizing metrics and monitoring data from various sources. It supports flexible dashboard creation, integration with different data sources, customizable visualizations (such as line charts, bar charts, gauges, heatmaps, and histograms), and interactive features for data exploration.

In this blog, we will see how to install and setup Grafana in your local environment on AWS EC2.

Let's dive into the steps👇

Grafana Setup on AWS EC2

Step 1: Go to the AWS console and Launch an EC2 instance for Grafana.

Step 2: Now, allow the inbound port 3000 from the “Security Group”.

Step 3: Now, take the ssh console and login into the machine.

Step 4: Download the GPG keys and add them to the trusted keys list.

sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget

# Getting the key
sudo wget -q -O /usr/share/keyrings/grafana.key

Step 5: Now, add it to the Grafana repository.

echo "deb [signed-by=/usr/share/keyrings/grafana.key] stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list

Step 6: Once it has been added, we need to update the system.

sudo apt-get update

Step 7: Now, we need to install the Grafana.

sudo apt-get install grafana

Step 8: After installation, add Grafana to auto-start and start the Grafana daemon itself.

sudo systemctl enable grafana-server
sudo systemctl start grafana-server

The installation of the Grafana repo is finished and ready to use.

Step 9: Now, check the status of the server.

sudo systemctl status grafana-server

Step 10: Now, go to the browser and can access the Grafana Dashboard by using a public IPv4 address followed by Grafana port 3000,i.e. <PublicIPv4_of_EC2:3000>.

Step 11: By default, Grafana credentials are Username: admin and Password: admin. Using this password change prompt will come.

Step 12: After default login you can change your Grafana password or skip password.

Step 13: You will be entered in the Grafana Dashboard.


In Conclusion, Grafana on AWS EC2 offers a powerful solution for visualizing and monitoring data. By leveraging the scalability and flexibility of AWS EC2, users can deploy Grafana instances to analyze various metrics and create insightful dashboards. This combination enables efficient data visualization, real-time monitoring, and effective decision-making for businesses and organizations.

Hope you find it helpful🤞 So I encourage you to try this on your own and let me know in the comment section👇 about your learning experience.✨

👆The information presented above is based on my interpretation. Suggestions are always welcome.😊

~Smriti Sharma✌