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

[Package Request]: windows_exporter #213642

Open
1 task done
jkroepke opened this issue Jan 18, 2025 · 5 comments · May be fixed by #213700
Open
1 task done

[Package Request]: windows_exporter #213642

jkroepke opened this issue Jan 18, 2025 · 5 comments · May be fixed by #213700
Labels
In-PR Package-Request This is a request for a package (new or updated version)

Comments

@jkroepke
Copy link

How can we help?

I would like help so I can submit the manifest.

Please read and ensure the following

  • The installer meets the above requirements

Please provide the following information

Download Page Url: https://github.com/prometheus-community/windows_exporter/releases/
Publisher: https://github.com/prometheus-community/
Package Name: windows_exporter
Description: Prometheus exporter for Windows machines
Package Version: 0.30.0
Installer Url: https://github.com/prometheus-community/windows_exporter/releases/download/v0.30.0/windows_exporter-0.30.0-amd64.msi

@jkroepke jkroepke added Help-Wanted This is a good candidate work item from the community. Package-Request This is a request for a package (new or updated version) labels Jan 18, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label Jan 18, 2025
@Dragon1573
Copy link
Contributor

✅ Manually verified with exe file.

😕 Is the exe portable? It turns on port 9182, but the server response HTTP 404 Not Found when visiting path /.

--> Installing WinGet
--> Disabling safety warning when running installers
Tip: you can type 'Update-EnvironmentVariables' to update your environment variables, such as after installing a new software.

--> Configuring Winget
Enabled admin setting 'LocalManifestFiles'.
Enabled admin setting 'LocalArchiveMalwareScanOverride'.

--> Installing the Manifest 0.30.0

Found windows_exporter [Prometheus.WindowsExporter] Version 0.30.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/prometheus-community/windows_exporter/releases/download/v0.30.0/windows_exporter-0.30.0-amd64.exe
  ██████████████████████████████  23.0 MB / 23.0 MB
Successfully verified installer hash
Starting package install...
Command line alias added: "windows_exporter-0.30.0-amd64"
Path environment variable modified; restart your shell to use the new value.
Successfully installed

--> Refreshing environment variables

--> Comparing ARP Entries

DisplayName      DisplayVersion Publisher            ProductCode                               Scope
-----------      -------------- ---------            -----------                               -----
windows_exporter 0.30.0         Prometheus Community Prometheus.WindowsExporter__DefaultSource User


PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> windows_exporter-0.30.0-amd64.exe
time=2025-01-18T17:24:12.212Z level=WARN source=os.go:108 msg="The os collect holds a number of deprecated metrics and will be removed mid 2025. See https://github.com/prometheus-community/windows_exporter/pull/1596 for more information." collector=os
time=2025-01-18T17:24:12.213Z level=WARN source=cs.go:75 msg="The cs collector is deprecated and will be removed in a future release. Logical processors has been moved to cpu_info collector. Physical memory has been moved to memory collector. Hostname has been moved to os collector."
time=2025-01-18T17:24:12.575Z level=INFO source=main.go:311 msg="Running as 2F549FF9-B67E-4\\WDAGUtilityAccount"
time=2025-01-18T17:24:12.576Z level=INFO source=main.go:228 msg="Enabled collectors: cpu, cs, memory, logical_disk, physical_disk, net, os, service, system"
time=2025-01-18T17:24:12.577Z level=INFO source=main.go:246 msg="starting windows_exporter in 367.1399ms" version=0.30.0 branch=HEAD revision=86e6d12518d2fa7f8f2f632634ade3aaa34fba22 goversion=go1.23.4 builddate=20250114-22:51:51 maxprocs=28
time=2025-01-18T17:24:12.577Z level=INFO source=tls_config.go:347 msg="Listening on" address=[::]:9182
time=2025-01-18T17:24:12.578Z level=INFO source=tls_config.go:350 msg="TLS is disabled." http2=false address=[::]:9182

Image

@Dragon1573
Copy link
Contributor

✅ Manually verified with wix file.

😕 No shortcuts are created on desktop or in Startup Panel.

--> Installing WinGet
--> Disabling safety warning when running installers
Tip: you can type 'Update-EnvironmentVariables' to update your environment variables, such as after installing a new software.

--> Configuring Winget
Enabled admin setting 'LocalManifestFiles'.
Enabled admin setting 'LocalArchiveMalwareScanOverride'.

--> Installing the Manifest 0.30.0

Found windows_exporter [Prometheus.WindowsExporter] Version 0.30.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/prometheus-community/windows_exporter/releases/download/v0.30.0/windows_exporter-0.30.0-amd64.msi
  ██████████████████████████████  11.4 MB / 11.4 MB
Successfully verified installer hash
Starting package install...
Successfully installed

--> Refreshing environment variables

--> Comparing ARP Entries

DisplayName      DisplayVersion Publisher            ProductCode                            Scope
-----------      -------------- ---------            -----------                            -----
windows_exporter 0.30.0         prometheus-community {A7B06148-F35F-485E-A77E-5787916498D8} Machine

⚠ It seems the application will be launched in background automatically after installation. But there's still nothing visiting http://localhost:9182/.

PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> & 'C:\Program Files\windows_exporter\windows_exporter.exe'
time=2025-01-18T17:34:18.712Z level=WARN source=cs.go:75 msg="The cs collector is deprecated and will be removed in a future release. Logical processors has been moved to cpu_info collector. Physical memory has been moved to memory collector. Hostname has been moved to os collector."
time=2025-01-18T17:34:18.712Z level=WARN source=os.go:108 msg="The os collect holds a number of deprecated metrics and will be removed mid 2025. See https://github.com/prometheus-community/windows_exporter/pull/1596 for more information." collector=os
time=2025-01-18T17:34:18.937Z level=INFO source=main.go:311 msg="Running as 2F549FF9-B67E-4\\WDAGUtilityAccount"
time=2025-01-18T17:34:18.937Z level=INFO source=main.go:228 msg="Enabled collectors: cpu, cs, memory, logical_disk, physical_disk, net, os, service, system"
time=2025-01-18T17:34:18.939Z level=INFO source=main.go:246 msg="starting windows_exporter in 228.6421ms" version=0.30.0 branch=HEAD revision=86e6d12518d2fa7f8f2f632634ade3aaa34fba22 goversion=go1.23.4 builddate=20250114-22:51:51 maxprocs=28
time=2025-01-18T17:34:18.939Z level=ERROR source=main.go:283 msg="Failed to start windows_exporter" err="listen tcp :9182: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted."

PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> Invoke-RestMethod -Uri http://localhost:9182/
Invoke-RestMethod : 404 page not found
At line:1 char:1
+ Invoke-RestMethod -Uri http://localhost:9182/
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> Invoke-WebRequest -Uri http://localhost:9182/
Invoke-WebRequest : 404 page not found
At line:1 char:1
+ Invoke-WebRequest -Uri http://localhost:9182/
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

@Dragon1573 Dragon1573 linked a pull request Jan 18, 2025 that will close this issue
7 tasks
@microsoft-github-policy-service microsoft-github-policy-service bot added In-PR and removed Help-Wanted This is a good candidate work item from the community. Needs-Triage This work item needs to be triaged by a member of the core team. labels Jan 18, 2025
@jkroepke
Copy link
Author

jkroepke commented Jan 19, 2025

@Dragon1573 to reduce the surface for any company enterprise scanners, the exporter exposes just 2 endpoints:

  • /metrics
  • /health

Since /metrics is the well-known default path within the eco system, it's fine in that context.

All endpoints are documented here: https://github.com/prometheus-community/windows_exporter#http-endpoints

/health is used as healthcheck if, if windows_exporter runs inside a Kubernetes cluster.

There is an upcoming 0.30.1 version which fixes installation issue under Windows Server 2025.

The windows_exporter does not offer a GUI or end-user capabilities. It just exposes metrics in the OpenMetrics format which can be actively scraped by a Prometheus instance. It's designed to run a system service. It can manually start from the terminal for testing. Thats the reason for not offering any shortcuts on desktop or Startup Panel. system admin can configure the behavior of the service by a file named config.yaml near to the binary.

The binary the partially portable. It works from Server 2016 up to Server 2025 + Windows 10 and Windows 11 without having any framework dependencies. However, there is an distinct binary for amd64 and arm64.

@jkroepke
Copy link
Author

Command line alias added: "windows_exporter-0.30.0-amd64"

would it be possible to just name the binary windows_exporter on the local system?

Dragon1573 added a commit to Dragon1573/winget-pkgs that referenced this issue Jan 19, 2025
- Rename portable binary, as instructed in microsoft#213642

Co-authored-by: Jan-Otto Kröpke <github@jkroepke.de>
@Dragon1573
Copy link
Contributor

Would it be possible to just name the binary windows_exporter on the local system?

✅ Resolved by commit Dragon1573/winget-pkgs@7f19682

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In-PR Package-Request This is a request for a package (new or updated version)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants