newrelic / nri-winservices

Windows services Integration for New Relic Infrastructure
Apache License 2.0
8 stars 8 forks source link

Research alternatives to WMI #67

Closed davidbrota closed 3 years ago

davidbrota commented 3 years ago

Is your feature request related to a problem? Please describe.

Collecting the services data through WMI is problematic in some environments. Sometimes the WMI query fails with cryptic errors that cannot be troubleshooted. Other times, the query causes a spike in the CPU and memory.

Feature Description

We would like collect the data from elsewhere, avoiding WMI at all cost.

Describe Alternatives

We should be able to collect the same data from the windows registry and Win32 API.

Priority

Really Want

carlossscastro commented 3 years ago

Alternative way would be using direct api calls using package golang.org/x/sys/windows/svc/mgr

Document with benchmarking (internal): https://docs.google.com/document/d/19MnwOTWjMAZjw6GYGrdAmzTT0T_OjIQmZTHp_1r3lJM/edit