You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to suggest to add support for MBean attribute's name regex, in the same fashion as the current domain_regex and bean_regex.
The desired behaviour would be that any attribute matching the regex would be included in list of matchingAttributes and tags would be attached to specify the matched value (as for bean_regex)
Why
Some Mbeans expose a variable set of attributes whose name contain information about what is being monitored.
My primary interest here is to be able to monitor Kafka's consumer lag. Kafka consumers expose one MBean for each client id and provide this lag for each partition of each topic they consume with as many MBean attributes, following this naming pattern: {topic}-{partition}.records-lag. See kafka 0.11 consumer monitoring documentation for more details.
I suggest to refactor those three in order to support matching based on regex.
I also suggest to update SimpleAttribute.addAdditionalTag() to add tags to document the matched value (in my kafka example: the topic name and partition number).
In order to populate those tags we need to have a tag name. I suggest to allow the user to specify them as part of the regex, as documented here in the java 7 regex documentation.
Who
I'm happy to start working on this and submit a PR if the approach above sounds ok to you.
What do you think ?
The text was updated successfully, but these errors were encountered:
Hi all,
What
I'd like to suggest to add support for MBean attribute's name regex, in the same fashion as the current
domain_regex
andbean_regex
.The desired behaviour would be that any attribute matching the regex would be included in list of matchingAttributes and tags would be attached to specify the matched value (as for bean_regex)
Why
Some Mbeans expose a variable set of attributes whose name contain information about what is being monitored.
My primary interest here is to be able to monitor Kafka's consumer lag. Kafka consumers expose one MBean for each client id and provide this lag for each partition of each topic they consume with as many MBean attributes, following this naming pattern:
{topic}-{partition}.records-lag
. See kafka 0.11 consumer monitoring documentation for more details.In the jconsole, that MBean looks like this:
How
The selection of MBean attributes to monitor is happening in this if statement of Instance.getMatchingAtrributes(), which ultimately delegates to either JMXSimpleAttribute.matchAttribute(), JMXComplexAttribute.matchAttribute() or JMXTabularAttribute.
I suggest to refactor those three in order to support matching based on regex.
I also suggest to update SimpleAttribute.addAdditionalTag() to add tags to document the matched value (in my kafka example: the topic name and partition number).
In order to populate those tags we need to have a tag name. I suggest to allow the user to specify them as part of the regex, as documented here in the java 7 regex documentation.
Who
I'm happy to start working on this and submit a PR if the approach above sounds ok to you.
What do you think ?
The text was updated successfully, but these errors were encountered: