美文网首页
Grafana+Prometheus监控集群node

Grafana+Prometheus监控集群node

作者: wanglinwei | 来源:发表于2019-07-26 09:14 被阅读0次

Node节点安装

wget https://github.com/prometheus/node_exporter/releases/download/v0.14.0/node_exporter-0.15.0.linux-amd64.tar.gz -O node_exporter-0.15.0.linux-amd64.tar.gz
tar -xvf node_exporter-0.15.0.linux-amd64.tar.gz
cd node_exporter-0.15.0.linux-amd64
./node_exporter &

Prometheus服务器安装(master安装)

wget https://github.com/prometheus/prometheus/releases/download/v2.0.0-rc.3/prometheus-2.0.0-rc.3.linux-amd64.tar.gz
tar -xvf prometheus-2.0.0-rc.3.linux-amd64.tar.gz
cd prometheus-2.0.0-rc.3.linux-amd64
mv prometheus.yml prometheus.yml-bak
vim prometheus.yml

global:
  scrape_interval:     15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: prometheus
    static_configs:
      - targets: ['localhost:9090']
        labels:
          instance: prometheus

  - job_name: linux1
    static_configs:
      - targets: ['192.168.161.162:9100']
        labels:
          instance: sys1

  - job_name: linux2
    static_configs:
      - targets: ['192.168.161.163:9100']
        labels:
          instance: sys2

启动./prometheus &
netstat -lntp | grep 9090
http://192.168.10.152:90

Grafana服务器安装(master安装)

yum install  go -y
yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.1-1.x86_64.rpm -y
git clone https://github.com/percona/grafana-dashboards.git
cp -r grafana-dashboards/dashboards/ /var/lib/grafana/

http://192.168.10.152:3000

相关文章

网友评论

      本文标题:Grafana+Prometheus监控集群node

      本文链接:https://www.haomeiwen.com/subject/lnmnhftx.html