-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: attributes as metrics & extra metrics #932
Comments
@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? |
Hi @dhoard, Thank you for your quick reply. For 1)
This let us draw nice graphs and implement filters based on someName and someOtherName. For 2)
|
@karina-ciupa Can you provide a few concrete examples of hardcoded label values? |
For 1) For 2) |
@dhoard : 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:
This data is currently not extractable by JMXExporter. job{username="JonDoe", jobname="runReport"} 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. |
Just FYI we have our Prometheus |
@karina-ciupa @MaBiConti if I understand correctly... For use case 1
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/ |
Hi all,
I am reaching out with a proposal for two different extensions of your project.
In the company that I work for, we needed to extend your project in order to collect additional data from non-standard mbeans. I am opening this discussion to check if you would be interested in merging these extensions in your project.
The mbeans that we are working with have a lot of string-type attributes which are not converted into metrics by your project.
However, we need to expose the information offered by these string attributes to Prometheus, such that they can be used in queries, or be displayed in graphs.
The best way to do this (that we were able to find) is to expose these attributes as labels on the other metrics. We made this behavior configurable in the rules section of the yaml configuration file. Here is an example:
This produces a metric that looks like this:
some_metric_attribute{firstStringAttribute="something",secondStringAttribute="something else"} 123
Some of the mbeans that we are working with do not expose any useful metrics, so we implemented a way to define a custom metric through the configuration file. This is also configurable in the rules section of the yaml configuration file. Here is an example:
This produces a metric that looks like this:
some_metric_someName{...} someValue
The description is used in the "HELP" section of the logs and indicates what purpose the metric serves.
Please let me know if you are interested in these features. If you are, I will open separate pull requests.
Also, please tell me if there is any way to achieve this behavior in another way that is already available in your project.
The text was updated successfully, but these errors were encountered: