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!

Accelerate Service Onboarding, Decomposition, Troubleshooting - and more with ITSI’s ...

Accelerate Service Onboarding, Decomposition, Troubleshooting - and more! Faster Time to ValueManaging and ...

New Release | Splunk Enterprise 9.3

Admins and Analyst can benefit from:  Seamlessly route data to your local file system to save on storage ...

2024 Splunk Career Impact Survey | Earn a $20 gift card for participating!

Hear ye, hear ye! The time has come again for Splunk's annual Career Impact Survey!  We need your help by ...