Skip to content

Commit

Permalink
Merge branch 'main' into otelconsumer-document-id
Browse files Browse the repository at this point in the history
  • Loading branch information
mauri870 authored Jan 30, 2025
2 parents acb3f58 + d4471e0 commit bbe1f10
Show file tree
Hide file tree
Showing 32 changed files with 1,465 additions and 41 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ CHANGELOG*
/metricbeat/module/redis @elastic/obs-infraobs-integrations
/metricbeat/module/system/ @elastic/elastic-agent-data-plane
/metricbeat/module/vsphere @elastic/obs-infraobs-integrations
/metricbeat/module/windows/wmi @elastic/obs-infraobs-integrations
/metricbeat/module/zookeeper @elastic/obs-infraobs-integrations
/packetbeat/ @elastic/sec-linux-platform
/script/ @elastic/elastic-agent-data-plane
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Add support of additional `collstats` metrics in mongodb module. {pull}42171[42171]
- Preserve queries for debugging when `merge_results: true` in SQL module {pull}42271[42271]
- Collect more fields from ES node/stats metrics and only those that are necessary {pull}42421[42421]
- Add new metricset wmi for the windows module. {pull}42017[42017]

*Metricbeat*
- Add benchmark module {pull}41801[41801]
Expand Down
93 changes: 62 additions & 31 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16404,6 +16404,37 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/go-ole/go-ole
Version: v1.2.6
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/go-ole/go-ole@v1.2.6/LICENSE:

The MIT License (MIT)

Copyright © 2013-2017 Yasuhiro Matsumoto, <mattn.jp@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/go-sql-driver/mysql
Version: v1.6.0
Expand Down Expand Up @@ -20790,6 +20821,37 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : github.com/microsoft/wmi
Version: v0.25.1
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/microsoft/wmi@v0.25.1/LICENSE:

MIT License

Copyright (c) Microsoft Corporation. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE


--------------------------------------------------------------------------------
Dependency : github.com/miekg/dns
Version: v1.1.61
Expand Down Expand Up @@ -44630,37 +44692,6 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/go-ole/go-ole
Version: v1.2.6
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/go-ole/go-ole@v1.2.6/LICENSE:

The MIT License (MIT)

Copyright © 2013-2017 Yasuhiro Matsumoto, <mattn.jp@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/go-openapi/jsonpointer
Version: v0.20.2
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/auditbeat-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: auditbeat
image: docker.elastic.co/beats/auditbeat-wolfi:9.0.0
image: docker.elastic.co/beats/auditbeat-wolfi:9.1.0
args: [
"-c", "/etc/auditbeat.yml",
"-e",
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/filebeat-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: filebeat
image: docker.elastic.co/beats/filebeat-wolfi:9.0.0
image: docker.elastic.co/beats/filebeat-wolfi:9.1.0
args: [
"-c", "/etc/filebeat.yml",
"-e",
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/heartbeat-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: heartbeat
image: docker.elastic.co/beats/heartbeat-wolfi:9.0.0
image: docker.elastic.co/beats/heartbeat-wolfi:9.1.0
args: [
"-c", "/etc/heartbeat.yml",
"-e",
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/metricbeat-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: metricbeat
image: docker.elastic.co/beats/metricbeat-wolfi:9.0.0
image: docker.elastic.co/beats/metricbeat-wolfi:9.1.0
args: [
"-c", "/etc/metricbeat.yml",
"-e",
Expand Down
4 changes: 2 additions & 2 deletions dev-tools/packaging/templates/docker/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ USER root
# Install required dependencies from wolfi repository
RUN for iter in {1..10}; do \
apk update && \
apk add --no-interactive --no-progress --no-cache nodejs-18=18.20.4-r0 npm=10.8.3-r0 glib dbus-glib libatk-1.0 \
apk add --no-interactive --no-progress --no-cache nodejs-18=18.20.6-r0 npm=11.1.0-r0 glib dbus-glib libatk-1.0 \
libatk-bridge-2.0 cups-libs libxcomposite libxdamage libxrandr libxkbcommon pango alsa-lib \
font-opensans fontconfig gtk icu-data-full libnss mesa font-noto-cjk font-noto-emoji && \
exit_code=0 && break || exit_code=$? && echo "apk error: retry $iter in 10s" && sleep 10; \
Expand Down Expand Up @@ -169,7 +169,7 @@ RUN echo \
# Setup synthetics env vars
ENV ELASTIC_SYNTHETICS_CAPABLE=true
ENV TZ=UTC
ENV NODE_VERSION=18.20.4
ENV NODE_VERSION=18.20.6
ENV PATH="$NODE_PATH/node/bin:$PATH"
# Install the latest version of @elastic/synthetics forcefully ignoring the previously
# cached node_modules, heartbeat then calls the global executable to run test suites
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ require (
github.com/elastic/toutoumomoma v0.0.0-20240626215117-76e39db18dfb
github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15
github.com/go-ldap/ldap/v3 v3.4.6
github.com/go-ole/go-ole v1.2.6
github.com/gofrs/uuid/v5 v5.2.0
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/google/cel-go v0.19.0
Expand All @@ -202,6 +203,7 @@ require (
github.com/klauspost/compress v1.17.11
github.com/meraki/dashboard-api-go/v3 v3.0.9
github.com/microsoft/go-mssqldb v1.7.2
github.com/microsoft/wmi v0.25.1
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.114.0
github.com/otiai10/copy v1.12.0
github.com/pierrec/lz4/v4 v4.1.21
Expand Down Expand Up @@ -307,7 +309,6 @@ require (
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.9 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,8 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/microsoft/go-mssqldb v1.7.2 h1:CHkFJiObW7ItKTJfHo1QX7QBBD1iV+mn1eOyRP3b/PA=
github.com/microsoft/go-mssqldb v1.7.2/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA=
github.com/microsoft/wmi v0.25.1 h1:sQv9hCEHtW5K6yEVL78T6XGRMGxk4aTpcJwCiB5rLN0=
github.com/microsoft/wmi v0.25.1/go.mod h1:1zbdSF0A+5OwTUII5p3hN7/K6KF2m3o27pSG6Y51VU8=
github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
github.com/miekg/dns v1.1.61 h1:nLxbwF3XxhwVSm8g9Dghm9MHPaUZuqhPiGL+675ZmEs=
github.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eykwQ=
Expand Down
2 changes: 1 addition & 1 deletion libbeat/docs/version.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:stack-version: 9.0.0
:stack-version: 9.1.0
:doc-branch: main
:go-version: 1.22.10
:release-state: unreleased
Expand Down
6 changes: 6 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -69582,6 +69582,12 @@ format: duration

--

[float]
=== wmi

wmi


[[exported-fields-zookeeper]]
== ZooKeeper fields

Expand Down
28 changes: 28 additions & 0 deletions metricbeat/docs/modules/windows.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,30 @@ metricbeat.modules:
metricsets: ["service"]
enabled: true
period: 60s
- module: windows
metricsets: ["wmi"]
period: 60s
wmi:
include_null: false # Exclude fields with null values from the output
include_queries: false # Do not include the query string in the output
include_empty_string: false # Exclude fields with empty string values from the output
warning_threshold: 30s # Maximum time to wait for a query result before logging a warning (defaults to period)
# Default WMI namespace for all queries (if not specified per query)
# Uncomment to override the default, which is "root\\cimv2".
# namespace: "root\\cimv2"
queries:
- class: Win32_OperatingSystem # FROM: Class to fetch
fields: # SELECT: Fields to retrieve for this WMI class. Omit the setting to fetch all properties
- FreePhysicalMemory
- FreeSpaceInPagingFiles
- FreeVirtualMemory
- LocalDateTime
- NumberOfUsers
where: "" # Optional WHERE clause to filter query results
# Override the WMI namespace for this specific query (optional).
# If set, this takes precedence over the default namespace above.
# namespace: "root\\cimv2" # Overrides the metric
----

[float]
Expand All @@ -63,8 +87,12 @@ The following metricsets are available:

* <<metricbeat-metricset-windows-service,service>>

* <<metricbeat-metricset-windows-wmi,wmi>>

include::windows/perfmon.asciidoc[]

include::windows/service.asciidoc[]

include::windows/wmi.asciidoc[]

:edit_url!:
28 changes: 28 additions & 0 deletions metricbeat/docs/modules/windows/wmi.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
////
This file is generated! See scripts/mage/docs_collector.go
////
:edit_url: https://github.com/elastic/beats/edit/main/metricbeat/module/windows/wmi/_meta/docs.asciidoc


[[metricbeat-metricset-windows-wmi]]
=== Windows wmi metricset

beta[]

include::../../../module/windows/wmi/_meta/docs.asciidoc[]


:edit_url:

==== Fields

For a description of each field in the metricset, see the
<<exported-fields-windows,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/windows/wmi/_meta/data.json[]
----
:edit_url!:
3 changes: 2 additions & 1 deletion metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,9 @@ This file is generated! See scripts/mage/docs_collector.go
|<<metricbeat-metricset-vsphere-resourcepool,resourcepool>> beta[]
|<<metricbeat-metricset-vsphere-virtualmachine,virtualmachine>>
|<<metricbeat-module-windows,Windows>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.2+| .2+| |<<metricbeat-metricset-windows-perfmon,perfmon>>
.3+| .3+| |<<metricbeat-metricset-windows-perfmon,perfmon>>
|<<metricbeat-metricset-windows-service,service>>
|<<metricbeat-metricset-windows-wmi,wmi>> beta[]
|<<metricbeat-module-zookeeper,ZooKeeper>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.3+| .3+| |<<metricbeat-metricset-zookeeper-connection,connection>>
|<<metricbeat-metricset-zookeeper-mntr,mntr>>
Expand Down
1 change: 1 addition & 0 deletions metricbeat/include/list_common.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,30 @@ metricbeat.modules:
enabled: true
period: 60s

- module: windows
metricsets: ["wmi"]
period: 60s
wmi:
include_null: false # Exclude fields with null values from the output
include_queries: false # Do not include the query string in the output
include_empty_string: false # Exclude fields with empty string values from the output
warning_threshold: 30s # Maximum time to wait for a query result before logging a warning (defaults to period)
# Default WMI namespace for all queries (if not specified per query)
# Uncomment to override the default, which is "root\\cimv2".
# namespace: "root\\cimv2"
queries:
- class: Win32_OperatingSystem # FROM: Class to fetch
fields: # SELECT: Fields to retrieve for this WMI class. Omit the setting to fetch all properties
- FreePhysicalMemory
- FreeSpaceInPagingFiles
- FreeVirtualMemory
- LocalDateTime
- NumberOfUsers
where: "" # Optional WHERE clause to filter query results
# Override the WMI namespace for this specific query (optional).
# If set, this takes precedence over the default namespace above.
# namespace: "root\\cimv2" # Overrides the metric

#------------------------------ ZooKeeper Module ------------------------------
- module: zookeeper
enabled: true
Expand Down
24 changes: 24 additions & 0 deletions metricbeat/module/windows/_meta/config.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,27 @@
metricsets: ["service"]
enabled: true
period: 60s

- module: windows
metricsets: ["wmi"]
period: 60s
wmi:
include_null: false # Exclude fields with null values from the output
include_queries: false # Do not include the query string in the output
include_empty_string: false # Exclude fields with empty string values from the output
warning_threshold: 30s # Maximum time to wait for a query result before logging a warning (defaults to period)
# Default WMI namespace for all queries (if not specified per query)
# Uncomment to override the default, which is "root\\cimv2".
# namespace: "root\\cimv2"
queries:
- class: Win32_OperatingSystem # FROM: Class to fetch
fields: # SELECT: Fields to retrieve for this WMI class. Omit the setting to fetch all properties
- FreePhysicalMemory
- FreeSpaceInPagingFiles
- FreeVirtualMemory
- LocalDateTime
- NumberOfUsers
where: "" # Optional WHERE clause to filter query results
# Override the WMI namespace for this specific query (optional).
# If set, this takes precedence over the default namespace above.
# namespace: "root\\cimv2" # Overrides the metric
Loading

0 comments on commit bbe1f10

Please sign in to comment.