Git Product home page Git Product logo

Comments (7)

dhoard avatar dhoard commented on July 17, 2024

@karina-ciupa ... just conversation...

For 1)

You should be able to expose String attribute values as labels using something like...

https://www.robustperception.io/exposing-version-numbers-with-the-jmx-exporter/

... but since the value is always a hardcoded number, I'm unsure of the actual value in dashboards/queries.

For 2)

Adding a metric that is hard coded (name, labels, value) doesn't seem useful from a metrics perspective. Can you elaborate on the use case?

from jmx_exporter.

karina-ciupa avatar karina-ciupa commented on July 17, 2024

Hi @dhoard,

Thank you for your quick reply.

For 1)
We need the string attributes to become labels on the metric of a different attribute. We have mbeans that have attributes such as: duration=10000, someName=someValue and someOtherName=someOtherValue. We would need to have a metric that looks like this:

some_metric_duration{someName="someValue", someOtherName="someOtherValue"} 10000

This let us draw nice graphs and implement filters based on someName and someOtherName.
Unfortunately, the solution from the article you linked does not fulfill our needs.


For 2)
The problem is that some of our mbeans only have string attributes, because they are only used to indicate that a given service is running. We want to generate a new metric such as "isRunning" with value 1.0, which has all the string attributes as labels.
For example our mbean has someName=someValue and someOtherName=someOtherValue as attributes and we want to produces a metric such as:

some_metric_isRunning{someName="someValue", someOtherName="someOtherValue"} 1.0

from jmx_exporter.

dhoard avatar dhoard commented on July 17, 2024

@karina-ciupa Can you provide a few concrete examples of hardcoded label values?

from jmx_exporter.

karina-ciupa avatar karina-ciupa commented on July 17, 2024

For 1)
some_metric_duration{serviceName="my service name", userName="ADMIN"} 10000

For 2)
some_metric_isRunning{serviceName="my service name", userName="ADMIN"} 1.0

from jmx_exporter.

MaBiConti avatar MaBiConti commented on July 17, 2024

@dhoard :
I'm chiming in, because I've been working on this feature together with @karina-ciupa .

For use-case 1), we are not hard-coding any values.

For 2), the application we want to monitor exposes MBeans that report something like:

  1. MBean "Job":

    • username: "JonDoe"
    • jobname: "runReport"
  2. MBean "Job":

    • username: "DonaldDuck"
    • jobname: "runReport"
  3. MBean "Job":

    • username: "DonaldDuck"
    • jobname: "exportIssues"

This data is currently not extractable by JMXExporter.
We want to expose it as:

job{username="JonDoe", jobname="runReport"} 1.0
job{username="DonaldDuck", jobname="runReport"} 1.0
job{username="DonaldDuck", jobname="exportIssues"} 1.0

With that data in Prometheus, we could chart the currently running jobs by summing up the jobs, or have a filter checking how many jobs of type "runReport" are running, etc.

from jmx_exporter.

fstab avatar fstab commented on July 17, 2024

Just FYI we have our Prometheus client_java community call today, so if you happen to be available and want to talk to Doug and me about this feel free to join https://calendar.google.com/calendar/u/0/embed?src=prometheus.io_bdf9qgm081nrd0fe32g3olsld0%40group.calendar.google.com.

from jmx_exporter.

dhoard avatar dhoard commented on July 17, 2024

@karina-ciupa @MaBiConti if I understand correctly...

For use case 1

metric.x label1="<MBean 1 value>" label2="<MBean 2 value>" <MBean 3 value>

This is complex since you are trying to create composite metrics based on multiple MBeans values. While I don't know your specific approach, this sounds like a collect and process scenario that could cause memory/performance issues.

For use case 2

This should already be doable as documented at https://www.robustperception.io/exposing-version-numbers-with-the-jmx-exporter/

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.