fix(inputs.win_wmi): Replace hard-coded class-name with correct config setting (#16782)

This commit is contained in:
Sven Rebhan 2025-04-16 16:09:06 +02:00 committed by GitHub
parent 508398d454
commit 7b1b49f0ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}