部署windows-exporter

2024-07-08  本文已影响0人  ljh123

一、安装

windows-exporter源码
下载对应版本

在windows中使用二进制方式部署

安装好之后,打开 http://127.0.0.1:9182/metrics

二、接入prometheus

1、通过静态文件配置加入

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: ["127.0.0.1:9182"]

三、图表

1、grafana

https://grafana.com/grafana/dashboards/

搜索:windows

https://grafana.com/grafana/dashboards/14694-windows-exporter-dashboard/

之后下载,导入到grafana里

2、夜莺

夜莺内置了一些常用exporter采集图表

我用的是社区版:v7.0.0,从仪表盘 -> 内置仪表盘 -> 搜索windows -> 点击搜索到的,选择带有 Node Exporter的图表

Pasted image 20240708124220.png

四、监控

一般需要对这些比较核心的指标进行配置告警

夜莺里面也有内置一些常用的监控策略,从告警管理 -> 内置规则 -> windows,选择 windows_by_exporter


Pasted image 20240708124344.png
上一篇下一篇

猜你喜欢

热点阅读