Merged
Conversation
Collaborator
|
@karina-calma I believe this can already be accomplished using existing functionality. See https://www.robustperception.io/converting-string-states-to-booleans-with-the-jmx-exporter/ |
Contributor
Author
|
Hi @dhoard, We took a look on this approach, but we have some concerns in term of performance, because this solution involves pattern matching for all the mbeans and all the rules. We have a significant number of mbeans and this approach will put a load on the server and increase response time. |
Collaborator
|
@karina-calma I merged #996 . Can you resolved the merge conflicts for this PR? |
Co-authored-by: Karina Calma <karina_calma@infobest.ro> Signed-off-by: Martin Bickel <martin.bickel@continental.com>
9795fb8 to
7842856
Compare
Contributor
Author
|
Hi @dhoard, we fixed the conflicts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has a dependency on PR. If this functionality is of interest then that PR will be merged first and then this one.
Some of our mbeans only have string attributes, so we won't have any metrics at all, as only numeric or boolean attributes will generate values. We have implemented a way to define a custom value via the configuration file. Here is an example: we want to generate a new metric, such as "isActive" with the value true (1.0)
includeObjectNames: ["io.prometheus.jmx:type=stringValue"]
metricCustomizers:
domain: io.prometheus.jmx
properties:
type: stringValue
extraMetrics:
value: true
description: This is a boolean value indicating if the scenario is still active or is completed.
If someone does not explicitly configure metricCustomizers, they should see no impact to performance. When the feature is used, we will go through all the elements in the metricCustomizers block and perform string comparison on the domain and the (optional) properties with every MBean that is matched by the defined rules. For those metrics that match, we will create a new metric with defined name and value. The description is used in the "HELP" section of the logs and indicates what purpose the metric serves.