From 7b1b49f0ba0bf07b1eda5f0eaa35ea371d6a512d Mon Sep 17 00:00:00 2001 From: Sven Rebhan <36194019+srebhan@users.noreply.github.com> Date: Wed, 16 Apr 2025 16:09:06 +0200 Subject: [PATCH] fix(inputs.win_wmi): Replace hard-coded class-name with correct config setting (#16782) --- plugins/inputs/win_wmi/method.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inputs/win_wmi/method.go b/plugins/inputs/win_wmi/method.go index a8cf33e97..463b20f4e 100644 --- a/plugins/inputs/win_wmi/method.go +++ b/plugins/inputs/win_wmi/method.go @@ -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) }