Skip to content

Commit

Permalink
Remove remote wmi logic from wmi.go. This can be reactivated by need
Browse files Browse the repository at this point in the history
  • Loading branch information
herrBez committed Mar 4, 2025
1 parent a779965 commit 28ed9a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion metricbeat/module/windows/wmi/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"LocalDateTime": "2024-12-12T15:46:39.62Z",
"NumberOfUsers": 1,
"class": "Win32_OperatingSystem",
"host": "localhost",
"namespace": "root\\cimv2"
}
}
Expand Down
10 changes: 6 additions & 4 deletions metricbeat/module/windows/wmi/wmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,15 @@ func (m *MetricSet) Fetch(report mb.ReporterV2) error {
MetricSetFields: mapstr.M{
"class": queryConfig.Class,
"namespace": namespace,
"host": m.config.Host,
// Remote WMI is intentionally hidden, this will always be localhost
// "host": m.config.Host,
},
}

if m.config.Domain != "" {
event.MetricSetFields.Put("domain", m.config.Domain)
}
// Remote WMI is intentionally hidden, this will always be the empty string
// if m.config.Domain != "" {
// event.MetricSetFields.Put("domain", m.config.Domain)
// }

if m.config.IncludeQueries {
event.MetricSetFields.Put("query", query)
Expand Down

0 comments on commit 28ed9a7

Please sign in to comment.