GithubHelp home page GithubHelp logo

Comments (10)

brian-brazil avatar brian-brazil commented on July 30, 2024

The recommended way to use the jmx exporter is as a java agent, which avoids this.

from jmx_exporter.

elecnix avatar elecnix commented on July 30, 2024

Thanks for the suggestion. The java agent is indeed easier and more lightweight to deploy. However, some applications already expose interesting metrics through MBeans, but may not be listening on a port. It is a bit invasive to require a restart of such applications only to have Prometheus scrape them, when they are already providing a mechanism to be scraped, through the Attach API.

from jmx_exporter.

brian-brazil avatar brian-brazil commented on July 30, 2024

In such a scenario, how do you plan on handling the application restarting?

from jmx_exporter.

elecnix avatar elecnix commented on July 30, 2024

If the application restarts for some reason, and jmx_exporter was connected through the Attach API, jmx_exporter would exit if it notices that the PID no longer exists. An external agent would re-launch it once the PID is known.

from jmx_exporter.

brian-brazil avatar brian-brazil commented on July 30, 2024

That seems a bit on the complicated side to me, and you'd likely be better off accepting the one restart required for the java agent.

from jmx_exporter.

elecnix avatar elecnix commented on July 30, 2024

Managing thousands of JVMs has to be slightly complicated ;-)

from jmx_exporter.

brian-brazil avatar brian-brazil commented on July 30, 2024

Have you considered not using JMX ;)

from jmx_exporter.

elecnix avatar elecnix commented on July 30, 2024

To elaborate, in a large system that consists of small services, some of them written a decade ago, and actively used by people, some are not designed to be restarted without causing some amount of disruption. Deploying a monitoring agent that spawns a jmx_exporter child to monitor these JVMs is a reasonable use-case.

It would be a small addition to the project that other people could find useful for other reasons (perhaps just to try it out on a running JVM prior to deciding to go for an agent).

from jmx_exporter.

elecnix avatar elecnix commented on July 30, 2024

Instead of adding an external agent to restart jmx_exporter, I'm thinking of giving the path to a PID file to jmx_exporter, and watching changes to that file through the same mechanism as the configuration reload.

from jmx_exporter.

brian-brazil avatar brian-brazil commented on July 30, 2024

I'm not sure this feature is worth the complexity it'd add, considering the objection to one of the supported ways we already have for this is that it causes a single application restart.

I'm already not a big fan of the webserver way of doing things.

from jmx_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.