Windows Exporter监控win10

Windows Exporter监控win10

安装

下载安装包,使用.msi格式能自动生成服务

GitHub - prometheus-community/windows_exporter: Prometheus exporter for Windows machines

配置

服务

image-20240624163737477

配置文件

放置于C:\Program Files\windows_exporter\config.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
# Note this is not an exhaustive list of all configuration values
collectors:
enabled: cpu,cs,logical_disk,net,os,service,system,textfile
collector:
service:
services-where: Name='windows_exporter'
scheduled_task:
include: /Microsoft/.+
log:
level: debug
scrape:
timeout-margin: 0.5
telemetry:
path: /metrics
max-requests: 5
web:
listen-address: ":9182"

修改注册表

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\windows_exporter

2

ImagePath修改为”C:\Program Files\windows_exporter\windows_exporter.exe” –log.file eventlog –config.file=”C:\Program Files\windows_exporter\config.yml”