Giter Club home page Giter Club logo

Comments (5)

nlighten avatar nlighten commented on August 14, 2024

The current setup kind of assumes that the datasource is defined on server level (in server.xml and/or global context.xml). In that case the datasource should be initialized during the initilization of the metrics war.

Are you defining the datasource in a context.xml inside your application war?

from tomcat_exporter.

billylamrealmatter avatar billylamrealmatter commented on August 14, 2024

from tomcat_exporter.

nlighten avatar nlighten commented on August 14, 2024

The metrics war initialization is normally done during first scrape by prometheus. At that point the decision is made to initialize TomcatJdbcPoolExports or not (based on the existence of certain datasource mbeans). If this happens before other wars containing an context.xml with a datasource definition are started you will not see the metrics.

One solution I can think of is setting the bindOnInit property or your connector to 'false'. Can you test this?

from tomcat_exporter.

billylamrealmatter avatar billylamrealmatter commented on August 14, 2024

from tomcat_exporter.

nlighten avatar nlighten commented on August 14, 2024

Added note to readme.

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.