Skip to content

Latest commit

 

History

History
62 lines (36 loc) · 1.84 KB

7.grafana_node_exporter.md

File metadata and controls

62 lines (36 loc) · 1.84 KB

Hướng dẫn tạo dashboard cho node exporter trên grafana

Bước 1: Cài đặt gafana

Như mô hình mình đã đề cập ở bài 3, node grafana có hệ điều hành là centos7 và địa chỉ ip là 10.10.10.175. Sau đây mình sẽ tiến hành đi vào cài đặt

  • Chuẩn bị
yum update -y

sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/sysconfig/selinux
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config

systemctl stop firewalld
systemctl disable firewalld

yum install vim git wget epel-release -y

init 6
  • Cài đặt
wget https://dl.grafana.com/oss/release/grafana-5.4.2-1.x86_64.rpm
yum install initscripts urw-fonts -y
rpm -Uvh grafana-5.4.2-1.x86_64.rpm 
systemctl daemon-reload
systemctl start grafana-server
systemctl status grafana-server
systemctl enable grafana-server.service

Bước 2: Add data source Prometheus

Truy cập vào http://10.10.10.175:3000 user/pass mặc định ban đầu là admin/admin. Nhớ đổi pass lần đầu nhé :)

Chọn button Add data source => Prometheus sau đó thiết lập như hình dưới

Bước 3: Import template

  • Sử dụng button hình dấu cộng sau đó chọn import. Sau đó tải file node_exporter.json về máy bạn.

  • Upload file json

  • Chọn datasource
  • Kết quả