How to Install and Use Grafana for Real-Time Data Visualization
Grafana is a powerful, self-hosted tool that turns complex metrics into clear, interactive dashboards and real-time charts. The best part is that you can install Grafana on multiple platforms via Docker, making setup quick, clean, and platform-agnostic. This guide will show you how to install Grafana using Docker and how to use it to effectively monitor system metrics and visualize real-time data.
Install Grafana using Docker
Before installing Grafana, make sure Docker is installed on your system.
To get started, execute the following command to pull the Grafana image:
sudo docker pull grafana/grafana

Now, start a new Grafana container in the background and map it to port 3000 with the following command:
sudo docker run -d -p 3000:3000 --name=grafana grafana/grafana

After running the Docker container, open your browser and go to http://localhost:3000 to access the Grafana dashboard. Use the default username and password, both set to admin , to log in to Grafana:
After you hit the login button, it will prompt you to update your password to avoid security risks. You can update and submit (recommended) the modified password or skip to continue with the default password:
After you log in successfully, the following dashboard will appear:
Apart from Grafana, you can also use any of these tools to monitor your Linux system.
Connect data sources and visualize data
Grafana lets you monitor multiple services and containers from a single dashboard. You can add multiple data sources (like Prometheus, MySQL, MongoDB, etc.) and visualize your data with pre-built or custom dashboards.
Let's connect Prometheus as our first data source. To do this, we'll install and run Prometheus using Docker:
sudo docker pull prom/prometheus
Run the Prometheus container using the following command:
sudo docker run -d -p 9090:9090 --name=prometheus prom/prometheus
Once the container is running, you can access the Prometheus web interface by visiting http://your_ip:9090.
Add data source
Now that Grafana and Prometheus are up and running, you can start by adding your first data source:
Select the data source you want to add, then enter the URL , such as http://your_ip:9090. Then click Save & Test and you should get the following message: Successfully queried the Prometheus API .
Create your first dashboard
Once connected, you can create dashboards to visualize your metrics with graphs, charts, and other dashboards. To do this, click the Create Dashboard button or New -> New dashboard .
Now, click the + Add a new visualization button to start a new dashboard by adding a visualization:
Finally, select Prometheus as the data source:
Use any of the available metrics, e.g. process_cpu_seconds_total and click the Run Queries button to visualize the data:
Similarly, you can add more visualizations (like CPU usage, memory, etc.) and drag and drop them into your layout.
This way, you can build real-time interactive views of your system or application data for easier monitoring and analysis.
Use the pre-built dashboard
Grafana allows importing community dashboards. For example, you can go to the official Grafana website and use any of the pre-built dashboards:
To use a pre-built dashboard, you can copy the ID of any dashboard from the official website and paste it into the Grafana dashboard section.
Now that Grafana is up and running, the next step is to explore advanced visualizations, install useful plugins, or integrate it with tools like Prometheus, MySQL, or Elasticsearch for a complete observability stack. You can also explore running other GUI-based applications in Docker to create a more interactive and flexible environment.
You should read it
- How to install Grafana on Alma Linux
- How to install and use Kali Linux on VmWare virtual machine
- How to install Solus Linux
- How to install Kali Linux on macOS
- 5 reasons to install Linux on old computers
- How to install Kali Linux on Android using Linux Deploy
- How to install NVIDIA drivers on Kali Linux
- How is Arch Linux different from other Linux versions?
- Steps to install Webex for Linux
- How to install Windows Game on Linux with Winepak
- Instructions for installing basic Arch Linux
- How to Install Tor Browser on Linux
Maybe you are interested
What's interesting about Squid Game 3? TOP of the best Soulslike games How to remove the 'chat' icon on the Windows 11 taskbar Where is the Music folder on the Mac? How to reset Windows Backup settings to default on Windows 10 Warning: New research has identified the corona virus to remain on the mask for more than a week