Skip to content

Commit

Permalink
Merge branch 'main' into module_pgbouncer
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrehilbert authored Oct 22, 2024
2 parents ceb5f55 + ec92e02 commit 6667c4d
Show file tree
Hide file tree
Showing 34 changed files with 204 additions and 42 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ https://github.com/elastic/beats/compare/v8.13.2\...v8.13.3[View commits]

*Metricbeat*

- Add new fields to configure the lease duration, retry and renew when using leader elector with Kubernetes autodiscover.{pull}38471[38471]
- Add new fields to configure the lease duration, retry and renew when using leader elector with Kubernetes autodiscover. {pull}38471[38471]


[[release-notes-8.13.2]]
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Added Cisco Meraki module {pull}40836[40836]
- Added Palo Alto Networks module {pull}40686[40686]
- Restore docker.network.in.* and docker.network.out.* fields in docker module {pull}40968[40968]
- Add `id` field to all the vSphere metricsets. {pull}41097[41097]
- Only watch metadata for ReplicaSets in metricbeat k8s module {pull}41289[41289]

*Metricbeat*
Expand Down
7 changes: 3 additions & 4 deletions filebeat/inputsource/udp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ package udp
import (
"net"

"github.com/dustin/go-humanize"

"github.com/elastic/beats/v7/filebeat/inputsource"
"github.com/elastic/beats/v7/filebeat/inputsource/common/dgram"
"github.com/elastic/elastic-agent-libs/logp"
Expand Down Expand Up @@ -62,12 +60,13 @@ func (u *Server) createConn() (net.PacketConn, error) {
if err != nil {
return nil, err
}
socketSize := int(u.config.ReadBuffer) * humanize.KiByte
if socketSize != 0 {

if int(u.config.ReadBuffer) != 0 {
if err := listener.SetReadBuffer(int(u.config.ReadBuffer)); err != nil {
return nil, err
}
}

u.localaddress = listener.LocalAddr().String()

return listener, err
Expand Down
102 changes: 86 additions & 16 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -67943,7 +67943,7 @@ Cluster information.
*`vsphere.cluster.datastore.names`*::
+
--
List of all the Datastore names associated with the cluster.
List of all the datastore names associated with the cluster.


type: keyword
Expand All @@ -67953,7 +67953,7 @@ type: keyword
*`vsphere.cluster.datastore.count`*::
+
--
Number of Datastores associated with the cluster.
Number of datastores associated with the cluster.


type: long
Expand Down Expand Up @@ -67985,7 +67985,7 @@ type: boolean
*`vsphere.cluster.host.count`*::
+
--
Number of Hosts associated with the cluster.
Number of hosts associated with the cluster.


type: long
Expand All @@ -67995,7 +67995,17 @@ type: long
*`vsphere.cluster.host.names`*::
+
--
List of all the Host names associated with the cluster.
List of all the host names associated with the cluster.


type: keyword

--

*`vsphere.cluster.id`*::
+
--
Unique cluster ID.


type: keyword
Expand All @@ -68016,7 +68026,7 @@ type: keyword
*`vsphere.cluster.network.count`*::
+
--
Number of Networks associated with the cluster.
Number of networks associated with the cluster.


type: long
Expand All @@ -68026,7 +68036,7 @@ type: long
*`vsphere.cluster.network.names`*::
+
--
List of all the Network names associated with the cluster.
List of all the network names associated with the cluster.


type: keyword
Expand Down Expand Up @@ -68160,6 +68170,16 @@ type: long
List of all the host names.


type: keyword

--

*`vsphere.datastore.id`*::
+
--
Unique datastore ID.


type: keyword

--
Expand Down Expand Up @@ -68245,10 +68265,20 @@ Datastore Cluster



*`vsphere.datastorecluster.id`*::
+
--
Unique datastore cluster ID.


type: keyword

--

*`vsphere.datastorecluster.name`*::
+
--
The Datastore Cluster name.
The datastore cluster name.


type: keyword
Expand Down Expand Up @@ -68282,7 +68312,7 @@ format: bytes
*`vsphere.datastorecluster.datastore.names`*::
+
--
List of all the Datastore names associated with the Datastore Cluster.
List of all the datastore names associated with the datastore cluster.


type: keyword
Expand All @@ -68292,7 +68322,7 @@ type: keyword
*`vsphere.datastorecluster.datastore.count`*::
+
--
Number of datastores in the Datastore Cluster.
Number of datastores in the datastore cluster.


type: long
Expand Down Expand Up @@ -68434,6 +68464,16 @@ format: bytes

--

*`vsphere.host.id`*::
+
--
Unique host ID.


type: keyword

--

*`vsphere.host.memory.free.bytes`*::
+
--
Expand Down Expand Up @@ -68754,6 +68794,16 @@ type: long

--

*`vsphere.network.id`*::
+
--
Unique network ID.


type: keyword

--

*`vsphere.network.name`*::
+
--
Expand All @@ -68767,7 +68817,7 @@ type: keyword
*`vsphere.network.status`*::
+
--
General health of the Network.
General health of the network.


type: keyword
Expand Down Expand Up @@ -68864,6 +68914,16 @@ type: long

--

*`vsphere.resourcepool.id`*::
+
--
Unique resource pool ID.


type: keyword

--



*`vsphere.resourcepool.memory.usage.guest.bytes`*::
Expand Down Expand Up @@ -69075,14 +69135,24 @@ type: keyword
Hostname of the host.


type: keyword

--

*`vsphere.virtualmachine.id`*::
+
--
Unique virtual machine ID.


type: keyword

--

*`vsphere.virtualmachine.name`*::
+
--
Virtual Machine name.
Virtual machine name.


type: keyword
Expand All @@ -69092,7 +69162,7 @@ type: keyword
*`vsphere.virtualmachine.os`*::
+
--
Virtual Machine Operating System name.
Virtual machine Operating System name.


type: keyword
Expand Down Expand Up @@ -69132,7 +69202,7 @@ type: long
*`vsphere.virtualmachine.memory.used.guest.bytes`*::
+
--
Used Memory of Guest in bytes.
Used memory of Guest in bytes.


type: long
Expand All @@ -69144,7 +69214,7 @@ format: bytes
*`vsphere.virtualmachine.memory.used.host.bytes`*::
+
--
Used Memory of Host in bytes.
Used memory of Host in bytes.


type: long
Expand All @@ -69156,7 +69226,7 @@ format: bytes
*`vsphere.virtualmachine.memory.total.guest.bytes`*::
+
--
Total Memory of Guest in bytes.
Total memory of Guest in bytes.


type: long
Expand All @@ -69168,7 +69238,7 @@ format: bytes
*`vsphere.virtualmachine.memory.free.guest.bytes`*::
+
--
Free Memory of Guest in bytes.
Free memory of Guest in bytes.


type: long
Expand Down
1 change: 1 addition & 0 deletions metricbeat/module/vsphere/cluster/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"entity_name": "121.0.0.0"
}
],
"id": "domain-c1",
"name": "Cluster_1",
"das_config": {
"enabled": false,
Expand Down
16 changes: 10 additions & 6 deletions metricbeat/module/vsphere/cluster/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
- name: names
type: keyword
description: >
List of all the Datastore names associated with the cluster.
List of all the datastore names associated with the cluster.
- name: count
type: long
description: >
Number of Datastores associated with the cluster.
Number of datastores associated with the cluster.
- name: das_config
type: group
fields:
Expand All @@ -32,11 +32,15 @@
- name: count
type: long
description: >
Number of Hosts associated with the cluster.
Number of hosts associated with the cluster.
- name: names
type: keyword
description: >
List of all the Host names associated with the cluster.
List of all the host names associated with the cluster.
- name: id
type: keyword
description: >
Unique cluster ID.
- name: name
type: keyword
description: >
Expand All @@ -47,11 +51,11 @@
- name: count
type: long
description: >
Number of Networks associated with the cluster.
Number of networks associated with the cluster.
- name: names
type: keyword
description: >
List of all the Network names associated with the cluster.
List of all the network names associated with the cluster.
- name: triggered_alarms.*
type: object
object_type: keyword
Expand Down
1 change: 1 addition & 0 deletions metricbeat/module/vsphere/cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func TestFetchEventContents(t *testing.T) {

testEvent := mapstr.M{
"name": "DC0_C0",
"id": "domain-c29",
"host": mapstr.M{
"count": 3,
"names": []string{"DC0_C0_H0", "DC0_C0_H1", "DC0_C0_H2"},
Expand Down
1 change: 1 addition & 0 deletions metricbeat/module/vsphere/cluster/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

func (m *ClusterMetricSet) mapEvent(cl mo.ClusterComputeResource, data *metricData) mapstr.M {
event := mapstr.M{
"id": cl.Self.Value,
"host": mapstr.M{
"count": len(data.assetNames.outputHostNames),
"names": data.assetNames.outputHostNames,
Expand Down
6 changes: 6 additions & 0 deletions metricbeat/module/vsphere/cluster/data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ func TestEventMapping(t *testing.T) {
ComputeResource: mo.ComputeResource{
ManagedEntity: mo.ManagedEntity{
Name: "Cluster_0",
ExtensibleManagedObject: mo.ExtensibleManagedObject{
Self: types.ManagedObjectReference{
Value: "CS_0",
},
},
},
},
Configuration: types.ClusterConfigInfo{
Expand Down Expand Up @@ -64,6 +69,7 @@ func TestEventMapping(t *testing.T) {
},
},
"name": "Cluster_0",
"id": "CS_0",
"host": mapstr.M{
"count": 1,
"names": []string{"Host_0"},
Expand Down
3 changes: 2 additions & 1 deletion metricbeat/module/vsphere/datastore/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
}
},
"fstype": "local",
"name": "LocalDS_0"
"name": "LocalDS_0",
"id": "datastore-0"
}
}
}
Loading

0 comments on commit 6667c4d

Please sign in to comment.