All Apps and Add-ons
Highlighted

Can i get JMX to connect Dynamically to a URL

Motivator

Hi

I have a process the can produce multiple JMX address on the server side.

LAUNCHERHIBERNATE - service:jmx:rmi://hp656srv.fr.murex.com:58884/jndi/rmi://hp656srv.fr.murex.com:58884/jmxrmi
LAUNCHER_WAREHOUSE - service:jmx:rmi://hp656srv.fr.murex.com:46153/jndi/rmi://hp656srv.fr.murex.com:46153/jmxrmi
etc....

I can get Splunk to read this file, but i now need it to update JMX dynamically as the URL will change each time. Is this possible. I know i can do it static, but not sure i can do it dynamically?

So if i can connect to JMX via search(SPL) this should work - so is it possible to do that?

Cheers in Advance
Robert

0 Karma
Highlighted

Re: Can i get JMX to connect Dynamically to a URL

Builder

As I understand your issue:
Splunk is indexing events as your process creates JMX addresses.

You want to be able to use call a custom command which will run a query against the JMX address in the event.

I would address this issue by creating a search command: http://dev.splunk.com/view/python-sdk/SP-CAAAEU2

The command you create can then be used at search time, and can take arguments based on the field in the events, which will then be run through the command.

0 Karma
Highlighted

Re: Can i get JMX to connect Dynamically to a URL

Motivator

Hi

Thanks for the answer.
So i am trying to understand this.

Normally the JMX would need a lot of information to pull JMX data down, this is stored in files in the JMX app.

for example /dell425srv2/apps/splunkoldversions/splunk703/splunk/etc/apps/SplunkTA_jmx/local

jmxtasks.conf
[MUREX]
description = MUREX
disabled = 0
index = jmx
interval = 20
servers = Splunk
TAjmx:TEST2 | SplunkTAjmx:TRADEINSERTION
sourcetype = jmx
templates = SplunkTAjmx:MUREX

This would also need jmxservers.conf
[TEST2]
description = TEST2
has
account = 1
interval = 60
jmx_url = service:jmx:rmi://mx12673vm:9092/jndi/rmi://mx12673vm:9092/jmxrmi

[TRADEINSERTION]
description = TRADE
INSERTION
hasaccount = 1
interval = 5
jmx
url = service:jmx:rmi://hp656srv:26827/jndi/rmi://hp656srv:26827/jmxrmi

What i need is to add multiple jmxurl onto the jmxserver.conf and create an increased line in servers = SplunkTAjmx:TEST2 | SplunkTAjmx:TRADE_INSERTION + X + Y etc...

What i am not really getting is how this custom search command would work?
What would the workflow be in this case? Would it change these files or would it be something different pure command line that i could run and it would do what above is doing but on the fly?

Thanks in advance
Robert Lynch

0 Karma
Highlighted

Re: Can i get JMX to connect Dynamically to a URL

Builder

You asked: So if i can connect to JMX via search(SPL) this should work - so is it possible to do that?

A custom command would enable you to connect to each JMX via SPL, at search time. I had inferred you were already indexing the logged events with the JMX urls.

However, it appears you are talking about dynamically updating configurations files in the TA?

Is there a RestAPI endpoint for the stanza you are trying to edit? You could try scripting it to change via Rest.

0 Karma