Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collect host resource metrics from Windows #67

Open
jakubgs opened this issue Jul 19, 2021 · 2 comments
Open

Collect host resource metrics from Windows #67

jakubgs opened this issue Jul 19, 2021 · 2 comments
Assignees

Comments

@jakubgs
Copy link
Member

jakubgs commented Jul 19, 2021

The nodes deployed in #59 expose metrics for Prometheus and are being collected, but there is no collection of host resource metrics, and as far as I can tell there is no Windows version of Netdata.

@jakubgs jakubgs self-assigned this Jul 19, 2021
@jakubgs jakubgs removed their assignment Apr 3, 2023
@markoburcul markoburcul self-assigned this Sep 16, 2024
@markoburcul
Copy link
Contributor

As stated in their documentation there is a Prometheus metrics exporter for windows which could be utilized to expose metrics to the outside. I've tested with some simple configuration for the exporter on windows-04.he-eu-hel1.ci.devel.status.im and got the metrics instantly available.

  1. Download the MSI file for windows exporter from their Github releases page.

  2. From powershell install the program by specifying MSI file location and options for the exporter:

PS C:\Users\admin\Desktop> msiexec /i "C:\Users\admin\Downloads\windows_exporter-0.28.2-amd64.msi" --% ENABLED_COLLECTORS=cpu,cs,logical_disk,net,os,system,cpu_info,memory,physical_disk LISTEN_PORT=9100
  1. The exporter is installed and running on port 9100 and metrics can be scraped on /metrics endpoint
mburcul@windows-04 MINGW64 ~
$ curl http://localhost:9100/metrics
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 2
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent
# TYPE go_gc_gogc_percent gauge
go_gc_gogc_percent 100
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes
# TYPE go_gc_gomemlimit_bytes gauge
go_gc_gomemlimit_bytes 9.223372036854776e+18
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 14
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.22.7"} 1
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 3.783168e+06
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 6.986832e+06
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 1.454908e+06
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 21986
...

@markoburcul
Copy link
Contributor

Netdata is moving forward and we can expect to have a windows native installer in the upcoming releases as stated here:

Native Windows Support

Netdata's current code base can now be compiled on Windows and runs smoothly on all versions of the Windows operating system.

Currently, this feature is in the internal testing phase. We are working on packaging it and adding Windows-specific
collectors. In the next Netdata release, we will provide binary packages for Microsoft Windows.

With the windows_exporter we can get metrics from the host but this will require modifications to some existing Grafana dashboards(Single Host Dashboard) which are created to suit netdata prometheus metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants