mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
Use perflib to gather metrics in the mssql collector
The perflib-based access code replaces WMI and is substantially more efficient and stable, leading to fewer collection timeouts in the mssql collector. Signed-off-by: Michael Allen <MAllen@laserfiche.com>
This commit is contained in:
@@ -58,6 +58,10 @@ var (
|
||||
|
||||
func registerCollector(name string, builder collectorBuilder, perfCounterNames ...string) {
|
||||
builders[name] = builder
|
||||
addPerfCounterDependencies(name, perfCounterNames)
|
||||
}
|
||||
|
||||
func addPerfCounterDependencies(name string, perfCounterNames []string) {
|
||||
perfIndicies := make([]string, 0, len(perfCounterNames))
|
||||
for _, cn := range perfCounterNames {
|
||||
perfIndicies = append(perfIndicies, MapCounterToIndex(cn))
|
||||
|
||||
2713
collector/mssql.go
2713
collector/mssql.go
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user