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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...