Comments (7)
@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.
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.
@karina-ciupa Can you provide a few concrete examples of hardcoded label values?
from jmx_exporter.
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.
@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:
-
MBean "Job":
- username: "JonDoe"
- jobname: "runReport"
-
MBean "Job":
- username: "DonaldDuck"
- jobname: "runReport"
-
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.
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.
@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)
- JMX exporter high memory usage. HOT 3
- have any metric about jvm GC Pause? HOT 3
- Can't add metrics to blacklistObjectNames HOT 6
- Plan for release with Prometheus Client 1.x? HOT 2
- no main manifest attribute, in jmx_prometheus_javaagent-0.19.0.jar HOT 1
- Hazelcast Metrics are not showing HOT 2
- Remote jmx has enabled SSL. How to configure jmx-exporter for verification? HOT 13
- Ability to use lowercaseOutputName in particular rules HOT 4
- jmx exporter inside Confluent Kafka broker container HOT 2
- After applying JMX filtering pattern, it takes 23 secs to scrape the metrics, is it expected behaviour? HOT 6
- Collection fails for Kafka using release 1.0.0 HOT 14
- feature request: allow to exclude specific attribute patterns inside a composite attribute HOT 3
- Clarify in documentation "jvm_*" metrics HOT 4
- jmxexporter adding incorrect _total suffix to #HELP and #TYPE when using COUNTER HOT 10
- Kafka Metrics showing type as "Untyped" HOT 3
- Advice for validating JMX exporter rules HOT 1
- Support multi-target in http server mode HOT 6
- JMX agent interfering with logging format of application HOT 3
- Extracting PM metrics on Kafka Cluster results in duplicate files due to different cases in the same metric names. HOT 5
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 jmx_exporter.