All Apps and Add-ons

Monitoring of Java Virtual Machines with JMX: How to call MBean operations via the Splunk UI?

sjotwani
New Member

Hi,

How to invoke MBean operations via Splunk UI. The application documentation says that the operations can be invoked.
I was able to invoke operations which return value by running below search:

index=jmx mbean_domain=jboss.system mbean_property_type=ServerInfo | table threadDump

But I am unsure how to invoke the other operations by MBeans. Where do I go to see the defined MBeans (config.xml) on the Splunk UI? How to call operations on them? Specifically operations, which do not return anything. How to pass parameters while invoking?

We can invoke them using JConsole ,but we would like to have single place (Splunk UI) to allow us to do many things.

I tried to look for answers all over the place, but couldn't find anything.
I did see the syntax of defining such operations by looking into config_operations_example.xml

0 Karma
1 Solution

Damien_Dallimor
Ultra Champion

Current functionality requires that you use a tool like JConsole to browse the available MBeans for available attributes/operation , and then manually write your config.xml file. There is no integrated MBean browser in Splunk.

Using JConsole you can see all of the available operations for an MBean (operation name, arguments and argument data types)

And as you have found , you can refer to config_operations_example.xml for a guide for the declaring the operation and any arguments to be invoked in your config.xml file.

View solution in original post

Damien_Dallimor
Ultra Champion

Current functionality requires that you use a tool like JConsole to browse the available MBeans for available attributes/operation , and then manually write your config.xml file. There is no integrated MBean browser in Splunk.

Using JConsole you can see all of the available operations for an MBean (operation name, arguments and argument data types)

And as you have found , you can refer to config_operations_example.xml for a guide for the declaring the operation and any arguments to be invoked in your config.xml file.

sjotwani
New Member

Thanks for your response Damien,

Assume a scenario, where there is a operation to stop the process exposed via MBean operation.
If I define this in config.xml, how this operation would be called.
It would be automatically called, when the app is starting? or is there any query to run on splunk UI to trigger the execution of defined operation?

0 Karma

Damien_Dallimor
Ultra Champion

When you setup up your JMX stanzas , you specify the internal at which you config files get executed.You can see this in UI.

If you have an MBean operation defined in your config file , it will get repeatedly executed as per this interval.

sjotwani
New Member

Thanks for your inputs Damien.
That really helps.

0 Karma
Get Updates on the Splunk Community!

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...