mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-15 09:26:36 +00:00
feat: windows_exporter uses own event log source to correctly format messages. (#1873)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> Signed-off-by: Jan-Otto Kröpke <github@jkroepke.de>
This commit is contained in:
@@ -172,6 +172,12 @@ func NewCollectorWithReflection(resultType CounterType, object string, instances
|
||||
continue
|
||||
}
|
||||
|
||||
if bufLen == 0 {
|
||||
errs = append(errs, errors.New("GetCounterInfo: buffer length is zero"))
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
buf := make([]byte, bufLen)
|
||||
if ret := GetCounterInfo(counterHandle, 0, &bufLen, &buf[0]); ret != ErrorSuccess {
|
||||
errs = append(errs, fmt.Errorf("GetCounterInfo: %w", NewPdhError(ret)))
|
||||
|
||||
Reference in New Issue
Block a user