Giter Club home page Giter Club logo

Comments (2)

nlighten avatar nlighten commented on August 14, 2024 1

@jejemontagne @hervenicol Thanks you the extensive test. I think that the actual cause is that since prometheus 0.0.12 an additional dependency for simpleclient_servlet_common needs to be added. I misinterpreted a previous report on this same error. Can you please try that:

ADD ["https://search.maven.org/remotecontent?filepath=io/prometheus/simpleclient_servlet_common/${TOMCAT_SIMPLECLIENT_VERSION}/simpleclient_servlet_common-${TOMCAT_SIMPLECLIENT_VERSION}.jar", \
     "/usr/local/tomcat/lib/simpleclient_servlet_common-${TOMCAT_SIMPLECLIENT_VERSION}.jar"]

Note that you cannot just mix and match TOMCAT_EXPORTER_VERSION and TOMCAT_SIMPLECLIENT_VERSION. You need to use the version tomcat exporter was compiled with (see pom.xml). The combination used in the example Dockerfile is fine.

from tomcat_exporter.

jejemontagne avatar jejemontagne commented on August 14, 2024

Thank you @nlighten for you quick answer !!
And more thanks because it was a wonderfully working answer !! 😉
All is working fine. 👌

Following combinations have been tested:

  • ✅ Tomcat 8.5 <--> simpleclient 0.11
  • ✅ Tomcat 8.5 <--> simpleclient 0.12
  • ✅ Tomcat 8.5 <--> simpleclient 0.15
  • ✅ Tomcat 9.0 <--> simpleclient 0.12
  • ✅ Tomcat 9.0 <--> simpleclient 0.15
  • ✅ Tomcat 10.0 <--> simpleclient 0.11
  • ✅ Tomcat 10.0 <--> simpleclient 0.12
  • ✅ Tomcat 10.0 <--> simpleclient 0.15

Dockerfile used for tests :

FROM tomcat:9.0-jdk17-openjdk-slim

ENV TOMCAT_SIMPLECLIENT_VERSION=0.15.0
ENV TOMCAT_EXPORTER_VERSION=0.0.15

ADD ["https://search.maven.org/remotecontent?filepath=io/prometheus/simpleclient/${TOMCAT_SIMPLECLIENT_VERSION}/simpleclient-${TOMCAT_SIMPLECLIENT_VERSION}.jar", \
     "/usr/local/tomcat/lib/simpleclient-${TOMCAT_SIMPLECLIENT_VERSION}.jar"]
ADD ["https://search.maven.org/remotecontent?filepath=io/prometheus/simpleclient_common/${TOMCAT_SIMPLECLIENT_VERSION}/simpleclient_common-${TOMCAT_SIMPLECLIENT_VERSION}.jar", \
     "/usr/local/tomcat/lib/simpleclient_common-${TOMCAT_SIMPLECLIENT_VERSION}.jar"]
ADD ["https://search.maven.org/remotecontent?filepath=io/prometheus/simpleclient_hotspot/${TOMCAT_SIMPLECLIENT_VERSION}/simpleclient_hotspot-${TOMCAT_SIMPLECLIENT_VERSION}.jar", \
     "/usr/local/tomcat/lib/simpleclient_hotspot-${TOMCAT_SIMPLECLIENT_VERSION}.jar"]
ADD ["https://search.maven.org/remotecontent?filepath=io/prometheus/simpleclient_servlet/${TOMCAT_SIMPLECLIENT_VERSION}/simpleclient_servlet-${TOMCAT_SIMPLECLIENT_VERSION}.jar", \
     "/usr/local/tomcat/lib/simpleclient_servlet-${TOMCAT_SIMPLECLIENT_VERSION}.jar"]
ADD ["https://search.maven.org/remotecontent?filepath=io/prometheus/simpleclient_servlet_common/${TOMCAT_SIMPLECLIENT_VERSION}/simpleclient_servlet_common-${TOMCAT_SIMPLECLIENT_VERSION}.jar", \
     "/usr/local/tomcat/lib/simpleclient_servlet_common-${TOMCAT_SIMPLECLIENT_VERSION}.jar"]
ADD ["https://search.maven.org/remotecontent?filepath=nl/nlighten/tomcat_exporter_client/${TOMCAT_EXPORTER_VERSION}/tomcat_exporter_client-${TOMCAT_EXPORTER_VERSION}.jar", \
     "/usr/local/tomcat/lib/tomcat_exporter_client-${TOMCAT_EXPORTER_VERSION}.jar"]
ADD ["https://search.maven.org/remotecontent?filepath=nl/nlighten/tomcat_exporter_servlet/${TOMCAT_EXPORTER_VERSION}/tomcat_exporter_servlet-${TOMCAT_EXPORTER_VERSION}.war", \
     "/usr/local/tomcat/webapps/metrics.war"]
docker build -t mytesttomcatexporter . && docker run -it -p 8080:8080 mytesttomcatexporter 

from tomcat_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.