Splunk AppDynamics

JMX tabular data

JohnGregg
Path Finder

Some JMX MBean operations take a parameter of type javax.management.openmbean.TabularData.  How can I provide that input through the UI?  I think it's basically key-value pairs like a map, but I don't know how to specify them.

JohnGregg_0-1780671666842.png

 

thanks

 

Labels (1)
Tags (1)
0 Karma

natecrisler
Path Finder

Hey John — your instinct is right: that parameter is the standard MXBean Map-to-TabularData mapping. A Map on an MXBean (here a String-to-String map) comes across JMX as a TabularData whose rows are CompositeData with two items literally named "key" and "value", and the table is indexed by "key". For setRecordingSettings the map is JFR setting-name to value, e.g. "jdk.ExecutionSample#enabled" maps to "true".

The catch — and the real answer to your question — is that a generic MBean console like the one in your screenshot (same with jconsole) can't build a TabularData from that text box. Those fields only take simple scalars; there's no string form the console will parse into a CompositeData/TabularData. So for this operation, through that UI specifically, you basically can't hand it the parameter. It's not a syntax you're missing — the console just doesn't construct open types.

What actually works, depending on what you've got:

  • A few lines of JMX client code is the reliable route. Connect with a JMXConnector, build a TabularDataSupport from the operation's own TabularType (rows are CompositeDataSupport with "key"/"value"), then call invoke(). jshell or a quick Groovy script is enough — no full project needed.
  • Jolokia/HawtIO, if that console happens to be Jolokia-based: its exec endpoint takes JSON and converts it into the open types, so a key/value map goes in as a JSON object instead of being hand-built.
  • For JFR specifically, sidestep TabularData entirely. FlightRecorder has String-based operations the console can drive directly: setPredefinedConfiguration(id, "profile") (or "default") applies a built-in profile, and setConfiguration(id, ...) takes a .jfc profile as a plain XML string. If your real goal is "configure this recording," those are far easier than reconstructing the settings map. And outside JMX, jcmd with the JFR.* subcommands, the jfr tool, or -XX:StartFlightRecording do the same with no MBean wrangling.

So — what are you actually trying to do: configure a JFR recording (then I'd reach for setPredefinedConfiguration/setConfiguration or jcmd), or do you specifically need to drive arbitrary TabularData operations through a console? And is that console plain JMX-over-HTTP or Jolokia/HawtIO? That decides which path fits.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Think Like an Architect: Introducing the Splunk Certified Cybersecurity Defense ...

In cybersecurity, defenders respond to threats. Architects design the systems that stop them.    As ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...