fix(inputs.win_wmi): Replace hard-coded class-name with correct config setting (#16782)
This commit is contained in:
parent
508398d454
commit
7b1b49f0ba
|
|
@ -149,7 +149,7 @@ func (m *method) execute(acc telegraf.Accumulator) error {
|
|||
defer outputParamsRaw.Clear()
|
||||
|
||||
// Execute the method
|
||||
outputRaw, err := service.CallMethod("ExecMethod", "StdRegProv", m.Method, inputParamsRaw)
|
||||
outputRaw, err := service.CallMethod("ExecMethod", m.ClassName, m.Method, inputParamsRaw)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to execute method %s: %w", m.Method, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue