此安装主要是为了监控服务器运行状况

1.下载node_exporter安装包(linux版)到 /opt/minitor/node_exporter 。

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

下载地址:https://download.csdn.net/download/a15565772151/11111928

可以私聊我一下我发你资源

2.运行 tar -zxvf node_exporter-0.16.0.linux-amd64.tar.gz ,解压文件到当前目录。

3.执行 vim /opt/minitor/prometheus/prometheus.yml,添加以下配置文件(红色部分):

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

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

    static_configs:
      - targets: ['ip:9090']
        labels:
          instance: prometheus
  - job_name: node
    static_configs:
      - targets: ['ip:9100']
        labels:
          instance: node

注意缩进对齐(很重要)

4.启动 node_exporter

nohup ./node_exporter &  

5.去prometheus中查看node的状态

监控服务器配置(三)-----Node_exporter安装配置 随笔 第1张

6.在grafana中查看配置状态(推荐使用8919)

监控服务器配置(三)-----Node_exporter安装配置 随笔 第2张

监控服务器配置(三)-----Node_exporter安装配置 随笔 第3张

7.效果图如下: 监控服务器配置(三)-----Node_exporter安装配置 随笔 第4张
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄