All Apps and Add-ons

JMX App: How to remove "key = " from the value of JMX attributes?

taxtgg
Engager

I am extracting JMX data from openDJ (LDAP by ForgeRock.com).
I tried:

and


In either case the fields show up in events like this:
ldapMessagesWritten="ldapMessagesWritten = 2035226"

The only clue I found was that there is no descriptor for the attributes (I am using JConsole)

Thanks.

Tags (2)

Damien_Dallimor
Ultra Champion

I will fire up a test instance of OpenDJ and have a look.
It seems that the actual MBean attribute value is being returned as "key=value" rather than just "value".
Splunk4JMX has an architecture that allows you to plug in custom Formatters which encapsulate the logic for the formatting of the event that gets Splunk'd.
It is pretty simple to write one.Have a look at the docs in the first instance, and if you need help creating one, I can certainly assist 🙂
The source code for current Formatters shipped with the product is also viewable on github.

A custom OpenDJJMXFormatter could simply have logic to strip the "key=" part from the JMX Attribute value.

Damien_Dallimor
Ultra Champion

Ok, come and get it , SPLUNK4JMX v1.5.3 released with above mentioned functionality !

0 Karma

Damien_Dallimor
Ultra Champion

Written some new code , just need to test it a bit more thoroughly before releasing.

So in your config.xml you'll be able to declare a pattern or list of patterns to strip content from the JMX attribute/operation values :

ie :




0 Karma

Damien_Dallimor
Ultra Champion

Actually , give me a day or so , I will release a new version of Splunk4JMX so you can pass a configuration parameter to the Formatter declaration in config.xml that allows you to declare a regex pattern, or list of regex patterns, that if matched, will strip the matched text from the returned JMX Attribute or Operation value. This is a more flexible and reusable approach than creating a custom formatter just for OpenDJ.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...