prometheus+node_exporter+grafana实践

本文详细介绍Prometheus监控系统的搭建过程,包括安装与配置node_exporter和Grafana,实现服务器基础监控项的采集与可视化展示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

介绍:

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

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

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

安装:

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

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
tar -zxvf node_exporter-0.16.0-rc.3.linux-amd64.tar.gz
cd node_exporter-0.16.0-rc.3.linux-amd64
./node_exporter 

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

yum install grafana
service grafana-server start

配置:

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

scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'node_exporter'

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
    - targets: ['localhost:9100']

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

效果:

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值