Skip to content
鼓励作者:欢迎打赏犒劳

监控服务器

linux环境下载:https://github.com/prometheus/node_exporter/releases

window环境下载:https://github.com/prometheus-community/windows_exporter/releases

本质上就是需要在服务器上下载一个node_exporter,有现成的指标暴露。

配置Prometheus

prometheus.yml

yml
scrape_configs:
  # 3. 主机服务器
  - job_name: 'host-server'
    static_configs:
      - targets: ['localhost:9182']   
    metrics_path: '/metrics'        
    scrape_interval: 5s

如有转载或 CV 的请标注本站原文地址