Setup Grafana on AWS EC2 Instance

Setup Grafana on AWS EC2 Instance

·

2 min read

Task:

Setup Grafana in your local environment on AWS EC2.

Proceed to the AWS console and initiate the launch of an EC2 instance.

In the security group of your EC2 instance, open port 3000 to authorize external entry for Grafana.

Once the instance is active, establish an SSH connection to access it.

Follow the provided Grafana instructions for system installation. Download the GPG keys and include them in the list of trusted keys:

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

Next, incorporate the Grafana repository:

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

Upon successful addition, update the system:

sudo apt update

Install Grafana:

sudo apt install grafana

Initiate Grafana using the command:

sudo systemctl start grafana-server

To enable automatic startup on boot, configure Grafana with:

sudo systemctl enable grafana-server

Verify the status of Grafana by executing:

sudo systemctl status grafana-server

Access Grafana through the web interface by entering the IP address or domain name of your EC2 instance in a web browser, followed by the default Grafana port (3000). For instance:

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

Now, log in to Grafana using the default credentials (admin/admin) and begin creating your initial dashboards.


Thanks for reading until here. See you in the next one.