diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index c167b8cc3e5b..b6e0fe229ff5 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -162,6 +162,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Add kubernetes storage class support via kube-state-metrics. {pull}16145[16145] - Add support for NATS 2.1. {pull}16317[16317] - Add Load Balancing metricset to GCP {pull}15559[15559] +- Add support for Dropwizard metrics 4.1. {pull}16332[16332] *Packetbeat* diff --git a/metricbeat/docs/modules/dropwizard.asciidoc b/metricbeat/docs/modules/dropwizard.asciidoc index de8d439fde01..03b5a863f2d0 100644 --- a/metricbeat/docs/modules/dropwizard.asciidoc +++ b/metricbeat/docs/modules/dropwizard.asciidoc @@ -10,7 +10,7 @@ This is the http://dropwizard.io[Dropwizard] module. The default metricset is `c [float] === Compatibility -The Dropwizard module is tested with dropwizard metrics 3.1.0. +The Dropwizard module is tested with dropwizard metrics 3.2.6, 4.0.0 and 4.1.2. [float] diff --git a/metricbeat/module/dropwizard/_meta/Dockerfile b/metricbeat/module/dropwizard/_meta/Dockerfile index 668844b9ef78..3098a420da1a 100644 --- a/metricbeat/module/dropwizard/_meta/Dockerfile +++ b/metricbeat/module/dropwizard/_meta/Dockerfile @@ -1,9 +1,16 @@ -ARG MAVEN_VERSION -FROM maven:${MAVEN_VERSION} +FROM maven:3.6-jdk-8 + +# Variables used in pom.xml +ARG DROPWIZARD_VERSION + +# Build the deployable war COPY test /test +WORKDIR /test +RUN mvn verify + +# Build the final image +FROM jetty:9.4.26-jre8 +COPY --from=0 /test/target/test-1.0-SNAPSHOT.war /var/lib/jetty/webapps/test.war HEALTHCHECK --interval=1s --retries=90 CMD curl -f http://localhost:8080/test/helloworld EXPOSE 8080 - -WORKDIR /test -CMD mvn jetty:run diff --git a/metricbeat/module/dropwizard/_meta/docs.asciidoc b/metricbeat/module/dropwizard/_meta/docs.asciidoc index 6f9f28bc8cc8..5f20730bc417 100644 --- a/metricbeat/module/dropwizard/_meta/docs.asciidoc +++ b/metricbeat/module/dropwizard/_meta/docs.asciidoc @@ -3,4 +3,4 @@ This is the http://dropwizard.io[Dropwizard] module. The default metricset is `c [float] === Compatibility -The Dropwizard module is tested with dropwizard metrics 3.1.0. +The Dropwizard module is tested with dropwizard metrics 3.2.6, 4.0.0 and 4.1.2. diff --git a/metricbeat/module/dropwizard/_meta/supported-versions.yml b/metricbeat/module/dropwizard/_meta/supported-versions.yml new file mode 100644 index 000000000000..0888fc679e72 --- /dev/null +++ b/metricbeat/module/dropwizard/_meta/supported-versions.yml @@ -0,0 +1,4 @@ +variants: + - DROPWIZARD_VERSION: 4.1.2 + - DROPWIZARD_VERSION: 4.0.0 + - DROPWIZARD_VERSION: 3.2.6 diff --git a/metricbeat/module/dropwizard/_meta/test/pom.xml b/metricbeat/module/dropwizard/_meta/test/pom.xml index 5efba5fb613f..e8d4dfb6c81d 100644 --- a/metricbeat/module/dropwizard/_meta/test/pom.xml +++ b/metricbeat/module/dropwizard/_meta/test/pom.xml @@ -17,24 +17,7 @@ io.dropwizard.metrics metrics-servlets - 4.0.0 + ${env.DROPWIZARD_VERSION} - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - - - - org.mortbay.jetty - maven-jetty-plugin - - - diff --git a/metricbeat/module/dropwizard/docker-compose.yml b/metricbeat/module/dropwizard/docker-compose.yml index 28347ef8ba20..4cb6fbd13f05 100644 --- a/metricbeat/module/dropwizard/docker-compose.yml +++ b/metricbeat/module/dropwizard/docker-compose.yml @@ -2,10 +2,10 @@ version: '2.3' services: dropwizard: - image: docker.elastic.co/integrations-ci/beats-dropwizard:${MAVEN_VERSION:-3.3-jdk-8}-1 + image: docker.elastic.co/integrations-ci/beats-dropwizard:${DROPWIZARD_VERSION:-4.1.2}-1 build: context: ./_meta args: - MAVEN_VERSION: ${MAVEN_VERSION:-3.3-jdk-8} + DROPWIZARD_VERSION: ${DROPWIZARD_VERSION:-4.1.2} ports: - 8080 diff --git a/metricbeat/module/dropwizard/test_dropwizard.py b/metricbeat/module/dropwizard/test_dropwizard.py index 767fe4e32c77..8e771c511c2e 100644 --- a/metricbeat/module/dropwizard/test_dropwizard.py +++ b/metricbeat/module/dropwizard/test_dropwizard.py @@ -6,6 +6,7 @@ import metricbeat +@metricbeat.parameterized_with_supported_versions class Test(metricbeat.BaseTest): COMPOSE_SERVICES = ['dropwizard']