prometheus-community / windows_exporter

Prometheus exporter for Windows machines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[v0.25.0-rc0] Very slow response time caused by perflib snapshot

JDA88 opened this issue · comments

Basic command line:
"windows_exporter-*-amd64.exe" --collectors.enabled cs,os,system --log.level=debug

Result in v0.24:

# HELP windows_exporter_collector_duration_seconds windows_exporter: Duration of a collection.
# TYPE windows_exporter_collector_duration_seconds gauge
windows_exporter_collector_duration_seconds{collector="cs"} 0
windows_exporter_collector_duration_seconds{collector="os"} 0.0051861
windows_exporter_collector_duration_seconds{collector="system"} 0
# HELP windows_exporter_perflib_snapshot_duration_seconds Duration of perflib snapshot capture
# TYPE windows_exporter_perflib_snapshot_duration_seconds gauge
windows_exporter_perflib_snapshot_duration_seconds 0.0032541
# HELP windows_exporter_collector_success windows_exporter: Whether the collector was successful.
# TYPE windows_exporter_collector_success gauge
windows_exporter_collector_success{collector="cs"} 1
windows_exporter_collector_success{collector="os"} 1
windows_exporter_collector_success{collector="system"} 1

Result in v0.25.0-rc0:

# HELP windows_exporter_collector_duration_seconds windows_exporter: Duration of a collection.
# TYPE windows_exporter_collector_duration_seconds gauge
windows_exporter_collector_duration_seconds{collector="cs"} 0
windows_exporter_collector_duration_seconds{collector="os"} 0.0048763
windows_exporter_collector_duration_seconds{collector="system"} 0
# HELP windows_exporter_perflib_snapshot_duration_seconds Duration of perflib snapshot capture
# TYPE windows_exporter_perflib_snapshot_duration_seconds gauge
windows_exporter_perflib_snapshot_duration_seconds 5.9065912
# HELP windows_exporter_collector_success windows_exporter: Whether the collector was successful.
# TYPE windows_exporter_collector_success gauge
windows_exporter_collector_success{collector="cs"} 1
windows_exporter_collector_success{collector="os"} 1
windows_exporter_collector_success{collector="system"} 1

windows_exporter_perflib_snapshot_duration_seconds take almost 6s on v0.25.0-rc0

Test done on the exact same machine, nothing of interess in the debug log.
I think perflib snapshot duration should be logued in the debug log no?

Sometime (might be related) when I start v0.25.0-rc0 I get error 500 on the URL and the folowing informations on the debug log
ts=2024-01-08T10:55:22.426Z caller=stdlib.go:105 level=error caller=http.go:144 msg="error gathering metrics: error collecting metric Desc{fqName: \"windows_exporter_collector_success\", help: \"windows_exporter: Whether the collector was successful.\", constLabels: {}, variableLabels: {collector}}: failed to prepare scrape: EOF"

Fixed with #1376