Day 73 - Setup Grafana on AWS EC2 Instance

Nikhil YadavNikhil Yadav
2 min read

Task:

Setup grafana in your local environment on AWS EC2.

Go to the AWS console and Launch an EC2 instance

Open port 3000 in your EC2 instance's security group to allow external access to Grafana.

Once the instance is launched, you can SSH into the instance.

Then, follow the instructions provided by Grafana to install it on your system;

Download the GPG keys and add them to the trusted keys list.

wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add

Now, add it to the Grafana repository.

sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"

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

sudo apt update

Install Grafana using command

sudo apt install grafana

Start Grafana: After Grafana is installed, you can start it by running the following command:

sudo systemctl start grafana-server

You can also configure Grafana to start automatically on boot by running:

sudo systemctl enable grafana-server

Check the status of grafana by running following command:

sudo systemctl status grafana-server

Access Grafana: Finally, you can access the Grafana web interface by navigating to the IP address or domain name of your EC2 instance in your web browser, followed by the default Grafana port (3000).

For example: http://<EC2-instance-IP-address>:3000

You should now be able to log in to Grafana using the default credentials (admin/admin) and start creating your first dashboards.

Thank you for reading!

0
Subscribe to my newsletter

Read articles from Nikhil Yadav directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Nikhil Yadav
Nikhil Yadav

I am a highly motivated and enthusiastic individual completed B.Tech from Savitribai Phule University, Pune . With a strong interest in DevOps and Cloud technologies, I am eager to kick-start my career in this domain. Although I do not have much professional experience, I possess a willingness to learn, excellent problem-solving skills, and a passion for technology. I am committed to contributing my best to any team I work with.