---
title: "A Record of Building a Visual Dashboard of Resource Usage with Grafana + Prometheus on Linux"
url: https://www.geekcorelab.cn/en-US/post/record-a-visualization-of-resource-utilization-using
updated: 2026-11-04T03:42:26.442182Z
author: "hhjmk"
summary: "本文介绍了在云服务器上部署监控系统，包括安装node_exporter、Prometheus和Grafana三个组件。首先通过Linux命令安装node_exporter用于收集系统数据，然后配置Prometheus以监听node_exporter数据，最后安装Grafana并添加Prometheus数据源及Dashboards，实现可视化监控。文章提供了详细的安装步骤和配置方法，适合需要搭建监控系统的人员参考。"
---

# A Record of Building a Visual Dashboard of Resource Usage with Grafana + Prometheus on Linux

If you use 1Panel, both Grafana and Prometheus have one-click versions in 1Panel, but the method of using the 1Panel apps has not been tested

![image](/uploads/import-placeholder/436)

![image](/uploads/import-placeholder/45)

If you want to use 1Panel, you can choose pre-installation when [purchasing a server](https://www.rainyun.com/github_)

![image](/uploads/import-placeholder/330)

The image above is a pre-installation example from [Rainyun](https://www.rainyun.com/github_); some providers may not support pre-installation, see [Online Installation - 1Panel Documentation](https://1panel.cn/docs/installation/online_installation/)

This article uses a home cloud + centos for demonstration

Preparations
----

First prepare the software environment

1. 1. node\_exporter

1. 1. prometheus

1. 1. grafana

These are essential

Installation
----

**First we install `node_exporter`**  
The purpose of node\_exporter is to collect machine system data.

Download the package from the official website  
![Installation package](/uploads/import-placeholder/433)
  
[Official package download](https://github.com/prometheus/node_exporter/releases/download/v1.0.0-rc.0/node_exporter-1.0.0-rc.0.linux-amd64.tar.gz)

Download and install using Linux commands

```
wget https://github.com/prometheus/node_exporter/releases/download/v1.0.0-rc.0/node_exporter-1.0.0-rc.0.linux-amd64.tar.gz #下载node_exporter包
```

![Download node_exporter](/uploads/import-placeholder/25)
```
tar xvf node_exporter-1.0.0-rc.0.linux-amd64.tar.gz #解压下载来的包
```

![Extract node_exporter](/uploads/import-placeholder/261)
```
mv node_exporter-1.0.0-rc.0.linux-amd64 node_exporter #把解压的目录改成node_exporter
```

![Rename the extracted directory to node_exporter](/uploads/import-placeholder/121)
```
cd node_exporter #进入node_exporter目录
```

![Enter the node_exporter directory](/uploads/import-placeholder/440)
```
./node_exporter #运行node_exporter
```

![Run it; success displays port 9100](/uploads/import-placeholder/41)
If you see this image, the code has been installed and run successfully

Visit http://localhost:9100/metrics

**Next, install `prometheus`**  
Prometheus is a general term for a class of data collection components. It is responsible for collecting data from targets and converting it into the format supported by Prometheus.

Download the package from the official website  
![Installation package](/uploads/import-placeholder/433)
  
[Official package download](https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.16.0.linux-amd64.tar.gz)  
![Screenshot of official download](/uploads/import-placeholder/38)

Download and install using Linux commands

```
wget https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.16.0.linux-amd64.tar.gz
```

![Download Prometheus](/uploads/import-placeholder/368)
```
tar xvf prometheus-2.16.0.linux-amd64.tar.gz #解压下载来的包
```

![Extract the package](/uploads/import-placeholder/131)
```
mv prometheus-2.16.0.linux-amd64.tar.gz prometheus#把解压的目录改成prometheus
```

![Rename the directory to prometheus](/uploads/import-placeholder/50)
```
cd prometheus #进入prometheus目录

```

![Enter the prometheus directory](/uploads/import-placeholder/89)
Here we need to pay attention to modifying the `prometheus` configuration file

Use `vim` to add the following under `scrape_configs` in the prometheus.yml file

```
 - job_name: 'node'
    static_configs:
      - targets: ['localhost:9100']

```

![Add the configuration file](/uploads/import-placeholder/126)
Here we listen to the data from `node_exporter`  
Finally we start the `prometheus` service

```
./prometheus #启动prometheus服务

```

![Start prometheus](/uploads/import-placeholder/178)
Visit http://47.103.87.205:9090/graph  
Search for up; if the following image appears, it means it is running successfully and data is being monitored  
If

```
up{instance="localhost:9090",job="prometheus"}    0
up{instance="localhost:9100",job="node"}    0
```

it means no data is being monitored

![Effect screenshot](/uploads/import-placeholder/27)
**Finally we install `grafana`**

```
wget https://dl.grafana.com/oss/release/grafana-6.6.2-1.x86_64.rpm
sudo yum localinstall grafana-6.6.2-1.x86_64.rpm

```

For other servers, see the official website  
Address <https://grafana.com/grafana/download?platform=linux>

```
sudo systemctl start grafana-server #启动grafana
```

![Start grafana](/uploads/import-placeholder/63)
Visit <http://localhost:3000/login>  
The default account and password are `admin`

Add the `prometheus` data source

![Add the prometheus data source](/uploads/import-placeholder/74)

![Configuration screenshot](/uploads/import-placeholder/163)
Add Dashboards  
![Add Dashboards](/uploads/import-placeholder/160)

Here we click Import to import Dashboards

![Import](/uploads/import-placeholder/224)
Enter the Dashboards json file downloaded from the official site, or use the Dashboards ID to retrieve it

![Import Dashboards](/uploads/import-placeholder/276)

![ID or JSON](/uploads/import-placeholder/216)
Take a look at the effect

![Effect screenshot](/uploads/import-placeholder/230)
Done
