Comments (2)
@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.
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)
- The metrics application cannot be restarted HOT 4
- TomcatJdbcPoolExports initialization issue HOT 5
- Whether it works on Windows server? HOT 1
- ClassNotFoundException: io.prometheus.client.exporter.MetricsServlet HOT 4
- A dashboard for this exporter? HOT 4
- Criação do contexto da aplicação no monitoramento do Pool de conexões do Datasource HOT 4
- Delayed metrics HOT 3
- Contect deadline exceed (Get https://my_ip/metrics/: context deadline exceeded) HOT 6
- Syntax issue in the output HOT 1
- Getting the ClassCastException exception when added the resource in the context.xml HOT 4
- embed jars? HOT 2
- Caused by: java.lang.ClassNotFoundException: io.prometheus.cloudwatch.WebServer HOT 1
- tomcat_exporter doesn't work HOT 2
- Duplicate registration exception when there are multiple jdbc connections defined in tomcat with latest prometheus library HOT 1
- prometheus 0.12.0 needs simpleclient_servlet_common HOT 2
- Add JMX Exporter features? HOT 3
- 404 after deploying metrics.war HOT 6
- Can't see the metrics HOT 6
- Is this project still maintained? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tomcat_exporter.