Skip to content

handsomestWei/prometheus-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prometheus-docker

基于docker容器,搭建node-exporter+prometheus+grafana服务监控平台

平台架构

组件依赖

组件 版本
node-exporter lastest
prometheus lastest
grafana lastest

部署node-exporter

系统监控

docker挂载linux系统文件

-v "/proc:/host/proc:ro" \
-v "/sys:/host/sys:ro" \
-v "/:/rootfs:ro" \

数据访问

数据访问地址http://xxxx:9100/metrics/
数据拉取地址http://xxxx:9100/

部署prometheus

数据拉取

prometheus.yml配置

  - job_name: linux
    static_configs:  
      - targets: ['localhost:9100']
        labels:
          instance: localhost

docker挂载配置文件和数据存储目录

-v /opt/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \
-v /data/prometheus:/prometheus \

数据访问

http://xxx:9090/graph
http://xxx:9090/targets

部署grafana

控制台登录

http://xxx:3000/
初始账号密码admin/admin

数据源配置

配置prometheus数据源

数据源访问地址为http://xxx:9090/

Releases

No releases published

Packages

No packages published

Languages