From 7eab148b17fbdbc982ba2e1518e1a20a503bd507 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Thu, 4 Mar 2021 12:51:25 +0100 Subject: [PATCH] Add supported versions file in Metricbeat module for Consul (#24123) With the supported versions file, images will be cached, reducing flakiness in CI. Added tests with Consul 1.9.3. --- CHANGELOG.next.asciidoc | 3 ++- metricbeat/docs/modules/consul.asciidoc | 2 +- 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 + 6 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 metricbeat/module/consul/_meta/supported-versions.yml diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index f235eda73a3..75e4e94c43d 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 Consul 1.9. {pull}24123[24123] +- 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* 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 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']