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

Integrate perflib_exporter into windows_exporter #1240

Closed
jkroepke opened this issue Jul 9, 2023 · 7 comments · Fixed by #1241
Closed

Integrate perflib_exporter into windows_exporter #1240

jkroepke opened this issue Jul 9, 2023 · 7 comments · Fixed by #1241

Comments

@jkroepke
Copy link
Member

jkroepke commented Jul 9, 2023

Hi,

writing this issue at this time seems like perflib_exporter has some lacks of maintenance. It includes the maintenance of outdated dependencies and other bugs seen as issue or PR.

The author of the library confirms that he is not longer using windows in production.
leoluk/perflib_exporter#25

I would like to ask if it make sense to merge the perflib_exporter into the windows_exporter to reduce the amount of unmaintained libraries. Since windows_exporter mostly depends on WMI metrics, it could be benefit of this.

@jkroepke
Copy link
Member Author

jkroepke commented Jul 9, 2023

@breed808 also let me know, if you need some assistance for maintenance. I'm already a member of the prometheus-community group.

@breed808
Copy link
Contributor

breed808 commented Jul 9, 2023

I'm open to assisting in the maintenance of perflib_exporter. Dependency management with Dependabot has been simple since it was introduced for windows_exporter.

Bugs would be harder for me to assist with; I don't currently use either exporter in a production/business environment

Do you envision perflib_exporter being added into the windows_exporter project as a separate Go package, or kept in a separate project?

@jkroepke
Copy link
Member Author

jkroepke commented Jul 9, 2023

Bugs would be harder for me to assist with; I don't currently use either exporter in a production/business environment

At least, we plan to use windows_exporter as part of Grafana Agent for VM monitoring + Kubernetes monitoring (windows nodes).

I also recently add a helm chart for windows_exporter on the prometheus-community/helm-charts repository.

I would see the perflib_exporter as part of the windows_exporter project as a separate Go package.
Alternative we cloud craft a new go package with code fragments from perflib_exporter to create a lightweight version of perflib_exporter that may only works with the windows_exporter and optimized it. I would personally not support use-cases outside windows_exporter for the perflib_exporter package.

@breed808
Copy link
Contributor

breed808 commented Jul 9, 2023

Sound good. I believe the MIT license applied to the Perflib exporter would allow us to copy the code into the windows_exporter project, so long as we include the copyright and permission notice.

I'd like to avoid a situation where both the perflib_exporter and the windows_exporter projects maintain separate copies of the perflib_exporter code.
@leoluk what are your thoughts on the potential migration discussed here?

@jkroepke
Copy link
Member Author

An alternative would be the package from datadog agent, which is Apache 2.0 licenced.

/~https://github.com/DataDog/datadog-agent/tree/main/pkg/util/winutil/pdhutil

@jkroepke
Copy link
Member Author

I open #1241 as example where I copy only a essential subset of the code which is required for windows_export. I also remove the HelpText queries, since they are not manadory for windows_exporter.

@leoluk
Copy link

leoluk commented Jul 19, 2023

Very much in favor of this - neither me nor my company have any Windows Server environments. The library is much better off being maintained actively as part of windows_exporter, I'm glad to see it is still useful!

I archived /~https://github.com/leoluk/perflib_exporter and pointed users to windows_exporter instead.

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

Successfully merging a pull request may close this issue.

3 participants