DevOps(Day-73): Grafana Setup

Biswaraj SahooBiswaraj Sahoo
2 min read

TABLE OF CONTENTS

Hope we are now clear with the basics of grafana, like why we use it, where we use it, what can we do with this and so on.

Now, let's do some practical stuff.


Task:

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.

Thanks for reading my article. Have a nice day.

WRITTEN BY Biswaraj Sahoo - | DevOps Engineer | Docker | Linux | Jenkins | AWS | Git | Terraform | Docker | kubernetes

Empowering communities via open source and education. Connect with me over linktree: linktr.ee/biswaraj333

0
Subscribe to my newsletter

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

Written by

Biswaraj Sahoo
Biswaraj Sahoo

--AWS Community Builder | DevOps Engineer | Docker | Linux | Jenkins | AWS | Git | Terraform | Docker | kubernetes Empowering communities via open source and education.