prometheus-node-exporter(grafana)

prometheus+node_exporter+grafana实践

 

介绍:

prometheus:开源监控系统,可参考博客prometheus的搭建与使用

node_exporter:服务器端agent,负责采集服务器基础监控项

grafana:一个开源的度量分析与可视化套件,常用于展示监控信息

安装:

安装node_exporter,启动后监听9100端口


 
  1. wget https://github.com/prometheus/node_exporter/releases/download/v0.16.0-rc.3/node_exporter-0.16.0-rc.3.linux-amd64.tar.gz

  2. tar -zxvf node_exporter-0.16.0-rc.3.linux-amd64.tar.gz

  3. cd node_exporter-0.16.0-rc.3.linux-amd64

  4. ./node_exporter

安装grafana,启动后监听3000端口


 
  1. yum install grafana

  2. service grafana-server start

配置:

1、配置prometheus,修改prometheus.yml配置文件,增加安装node_exporter的机器,配置完成后重启


 
  1. scrape_configs:

  2. # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.

  3. - job_name: 'node_exporter'

  4.  
  5. # metrics_path defaults to '/metrics'

  6. # scheme defaults to 'http'.

  7.  
  8. static_configs:

  9. - targets: ['localhost:9100']

2、配置grafana增加data source,访问localhost:3000,推荐展示样式选择Node Exporter Full

效果:

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章