Would you like to learn how to perform a Grafana Docker install on Ubuntu Linux? In this tutorial, we are going to show you how to install a Grafana docker container on Linux and how to access your Grafana web administration interface for the first time.
What is Grafana?
Grafana is an open-source platform for data monitoring, analysis, and visualization that comes with a web server that allows it to be accessed from anywhere.
On the Web interface, users are able to create Grafana dashboards with panels to represent metrics over time.
Grafana Tutorial:
On this page, we offer quick access to a list of Grafana tutorials.
Tutorial – Grafana Docker Installation
On the Linux console, use the following commands to install Docker.
# apt-get update
# apt-get install docker.io
Download the Grafana docker image from the online repository.
# docker pull grafana/grafana:latest
List the Docker images installed on your system.
# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
grafana/grafana latest d20d0cdfb55e 12 days ago 241MB
Create the required folders and set the correct permission.
# mkdir /var/lib/grafana -p
# chown -R 472:472 /var/lib/grafana
Start a new Grafana docker container using the Grafana image downloaded.
# docker run -d -p 3000:3000 -v /var/lib/grafana:/var/lib/grafana -e “GF_SECURITY_ADMIN_PASSWORD=kamisama123” grafana/grafana
6cdc19eef9e04b210796deab0afd4796b8d2b2f3eb28e342e684e1858f10b763
Take note of the docker container ID.
Our Grafana container ID 6cdc19eef9e04b210796deab0afd4796b8d2b2f3eb28e342e684e1858f10b763.
In our example, the Grafana image was used to start a new Grafana container using the local port 3000.
In our example, the Grafana admin password was set to kamisama123.
Verify the status of the Grafana container using the following command:
# docker ps -a -f id=6cdc19eef9e04b210796deab0afd4796b8d2b2f3eb28e342e684e1858f10b763
CONTAINER ID IMAGE CREATED STATUS
6cdc19eef9e0 grafana/grafana About an hour ago Up 20 minutes
To stop the Grafana container service use the following command:
# docker container stop 6cdc19eef9e04b210796deab0afd4796b8d2b2f3eb28e342e684e1858f10b763
To start the Grafana container service use the following command:
# docker container start 6cdc19eef9e04b210796deab0afd4796b8d2b2f3eb28e342e684e1858f10b763
In case of error, use the following command to verify the Grafana container logs.
docker logs 6cdc19eef9e04b210796deab0afd4796b8d2b2f3eb28e342e684e1858f10b763
Keep in mind that you have to change the docker container ID to reflect your environment.
Grafana Dashboard Login
Open your browser and enter the IP address of your server plus :3000.
In our example, the following URL was entered in the Browser:
• http://34.216.84.149:3000
The Grafana web interface should be presented.
On the prompt screen, enter the Grafana Default Password login information.
• Username: admin
• Password: kamisama123
Keep in mind, that we set kamisama123 as the Grafana default password.
After a successful login, the Grafana dashboard will be displayed.
Congratulations! You have successfully created a Grafana docker installation on Ubuntu Linux.
Leave A Comment
You must be logged in to post a comment.