Table of contents
ask:
Setup Grafana in your local environment on AWS EC2.
Create an EC2 instance in the AWS management console.
Login to the server and install the below dependencies for Grafana.
sudo apt-get install -y apt-transport-https
sudoapt-getinstall-y software-properties-common wget
Download the key required to setup Grafana in the server.
sudo wget -q -O /usr/share/keyrings/grafana.key apt.grafana.com/gpg.key
Install the stable version of Grafana in the server.
Stable release
echo "deb [signed-by=/usr/share/keyrings/grafana.key] apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
Update the EC2 instance.
# Update the list of available packages
sudo apt-get update
Install Grafana in the instance using the below command.
# Install the latest OSS release:
sudo apt-get install grafana
Start and enable the Grafana server using the below commands.
sudo systemctl start grafana-server
sudo systemctl enable grafana-server
Also you can check the current status of Grafana using the below command.
sudo systemctl status grafana-server
Grafana by default runs on port 3000. Therefore open the port 3000 for the EC2 instance.
Navigate through the public URL of the instance with the use of port and you can finally see the Grafana webpage.
Login to Grafan using default id and password i.e admin and admin. Then change the password upon the first login.
Finally, we have entered the Grafana Web application.