prometheus / jmx_exporter

A process for exposing JMX Beans via HTTP for Prometheus consumption
Apache License 2.0
3.06k stars 1.2k forks source link

Metrics for a specific process #925

Closed kenytux closed 6 months ago

kenytux commented 8 months ago

Hello, I want to get metrics from a specific java application process (Like memory and cpu usage) Does it possible?

dhoard commented 8 months ago

The exporter will provide access to JMX metrics exposed from the Java application process, but you still need/should do application monitoring at the OS level.

kenytux commented 8 months ago

For example, if I have an application called myapp, can I have it's memory usage (Like 8gb for myapp)? Iif it is how I do it?

dhoard commented 8 months ago

Yes. Here is a list of built-in Java MBeans:

https://docs.oracle.com/javase/8/docs/api/java/lang/management/PlatformManagedObject.html

kenytux commented 8 months ago

Thank you I will take a look

kenytux commented 8 months ago

Can you help me more?

dhoard commented 8 months ago

The documentation (README.md) describes the installation and configuration in general terms, but the nuances are related to your specific application, deployment environment, etc.

I would start with "Running the Agent" https://github.com/prometheus/jmx_exporter?tab=readme-ov-file#running-the-java-agent.