From a9b9c096d05b4d4b5c29518abd71ce036503a3dd Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Fri, 19 Feb 2021 11:06:34 +0100 Subject: [PATCH 1/4] Add supported versions file in Metricbeat module for Consul With the supported versions file, images will be cached, reducing flakiness in CI. Added tests with Consul 1.9.3. --- metricbeat/module/consul/_meta/docs.asciidoc | 2 +- metricbeat/module/consul/_meta/supported-versions.yml | 3 +++ metricbeat/module/consul/docker-compose.yml | 4 ++-- metricbeat/module/consul/test_consul.py | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 metricbeat/module/consul/_meta/supported-versions.yml diff --git a/metricbeat/module/consul/_meta/docs.asciidoc b/metricbeat/module/consul/_meta/docs.asciidoc index 54c8a2dcd50..7cb680835c6 100644 --- a/metricbeat/module/consul/_meta/docs.asciidoc +++ b/metricbeat/module/consul/_meta/docs.asciidoc @@ -3,7 +3,7 @@ This is the https://www.consul.io[Hashicorp's Consul] Metricbeat module. It is s [float] === Compatibility -The module is being tested with https://github.com/hashicorp/docker-consul/blob/9bd2aa7ecf2414b8712e055f2374699148e8941c/0.X/Dockerfile[1.4.2] version +The module is being tested with 1.4.2 and 1.9.3 versions of Consul. [float] === Dashboard diff --git a/metricbeat/module/consul/_meta/supported-versions.yml b/metricbeat/module/consul/_meta/supported-versions.yml new file mode 100644 index 00000000000..298a53d9db8 --- /dev/null +++ b/metricbeat/module/consul/_meta/supported-versions.yml @@ -0,0 +1,3 @@ +variants: + - CONSUL_VERSION: 1.4.2 + - CONSUL_VERSION: 1.9.3 diff --git a/metricbeat/module/consul/docker-compose.yml b/metricbeat/module/consul/docker-compose.yml index c1b4b32e2ab..5131b14aa32 100644 --- a/metricbeat/module/consul/docker-compose.yml +++ b/metricbeat/module/consul/docker-compose.yml @@ -2,10 +2,10 @@ version: '2.3' services: consul: - image: docker.elastic.co/integrations-ci/beats-consul:${CONSUL_VERSION:-1.4.2}-1 + image: docker.elastic.co/integrations-ci/beats-consul:${CONSUL_VERSION:-1.9.3}-1 build: context: ./_meta args: - CONSUL_VERSION: ${CONSUL_VERSION:-1.4.2} + CONSUL_VERSION: ${CONSUL_VERSION:-1.9.3} ports: - 8500 diff --git a/metricbeat/module/consul/test_consul.py b/metricbeat/module/consul/test_consul.py index c18dff5a2f1..e1bd80a47b6 100644 --- a/metricbeat/module/consul/test_consul.py +++ b/metricbeat/module/consul/test_consul.py @@ -20,6 +20,7 @@ ] +@metricbeat.parameterized_with_supported_versions class ConsulAgentTest(metricbeat.BaseTest): COMPOSE_SERVICES = ['consul'] From 5408935251f8379a7d088cb68950012cb267a53d Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Fri, 19 Feb 2021 11:10:11 +0100 Subject: [PATCH 2/4] Make update --- metricbeat/docs/modules/consul.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metricbeat/docs/modules/consul.asciidoc b/metricbeat/docs/modules/consul.asciidoc index 9d6e3751eaf..d266e1ddb28 100644 --- a/metricbeat/docs/modules/consul.asciidoc +++ b/metricbeat/docs/modules/consul.asciidoc @@ -12,7 +12,7 @@ This is the https://www.consul.io[Hashicorp's Consul] Metricbeat module. It is s [float] === Compatibility -The module is being tested with https://github.com/hashicorp/docker-consul/blob/9bd2aa7ecf2414b8712e055f2374699148e8941c/0.X/Dockerfile[1.4.2] version +The module is being tested with 1.4.2 and 1.9.3 versions of Consul. [float] === Dashboard From 816082a1cbe3d87a771d60f52c6d8effa2bfb2bd Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Mon, 1 Mar 2021 15:33:08 +0100 Subject: [PATCH 3/4] Add changelog --- CHANGELOG.next.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 641f7a769a9..3033c6cfe1e 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -130,7 +130,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - kubernetes.container.cpu.limit.cores and kubernetes.container.cpu.requests.cores are now floats. {issue}11975[11975] - Change types of numeric metrics from Kubelet summary api to double so as to cover big numbers. {pull}23335[23335] - Add container.image.name and containe.name ECS fields for state_container. {pull}23802[23802] -- Add support for the MemoryPressure, DiskPressure, OutOfDisk and PIDPressure status conditions in state_node. {pull}[23905] +- Add support for the MemoryPressure, DiskPressure, OutOfDisk and PIDPressure status conditions in state_node. {pull}23905[23905] +- Add support for Consul 1.9. {pull}24123[24123] *Packetbeat* From 9d233af1a69aa9775c9d1bb9a83bd740ef93d768 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Mon, 1 Mar 2021 15:33:57 +0100 Subject: [PATCH 4/4] Fix changelog --- CHANGELOG.next.asciidoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 77c99538993..13d9d1bd3fe 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -130,9 +130,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - kubernetes.container.cpu.limit.cores and kubernetes.container.cpu.requests.cores are now floats. {issue}11975[11975] - Change types of numeric metrics from Kubelet summary api to double so as to cover big numbers. {pull}23335[23335] - Add container.image.name and containe.name ECS fields for state_container. {pull}23802[23802] -- Add support for the MemoryPressure, DiskPressure, OutOfDisk and PIDPressure status conditions in state_node. {pull}23905[23905] - Add support for Consul 1.9. {pull}24123[24123] -- Add support for the MemoryPressure, DiskPressure, OutOfDisk and PIDPressure status conditions in state_node. {pull}[23905] +- Add support for the MemoryPressure, DiskPressure, OutOfDisk and PIDPressure status conditions in state_node. {pull}23905[23905] - Store `cloudfoundry.container.cpu.pct` in decimal form and as `scaled_float`. {pull}24219[24219] *Packetbeat*