#90daysofdevops-Day-73: Grafana Setup

#90daysofdevops-Day-73: Grafana Setup

ask:

Setup Grafana in your local environment on AWS EC2.

  1. Create an EC2 instance in the AWS management console.

  2. 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

  3. Download the key required to setup Grafana in the server.

    sudo wget -q -O /usr/share/keyrings/grafana.key apt.grafana.com/gpg.key

  4. 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

  5. Update the EC2 instance.

    # Update the list of available packages

    sudo apt-get update

  6. Install Grafana in the instance using the below command.

    # Install the latest OSS release:

    sudo apt-get install grafana

  7. 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

  8. Grafana by default runs on port 3000. Therefore open the port 3000 for the EC2 instance.

  9. Navigate through the public URL of the instance with the use of port and you can finally see the Grafana webpage.

  10. Login to Grafan using default id and password i.e admin and admin. Then change the password upon the first login.

  11. Finally, we have entered the Grafana Web application.