Getting Data In

 


JMS/JMX - write your own

JMS/JMX - write your own

You can write custom Java Message Service (JMS) or Java Management Extension (JMX) scripts and then set up Splunk to run the scripts at regular intervals to gather data about your Java MBeans, VMs or other J2EE-based technical services.

First, write and test your JMS or JMX script. Once that's done, place it in $SPLUNK_HOME/bin/scripts on the Splunk instance you want to monitor your Java environment.

Then, point Splunk at this script:

1. From the Home page in Splunk Web, click Add data.

2. Under the To get started... banner, click WebSphere logs, metrics and other data.

3. Click Next under Collect messages from JMS.

4. On the Add New page, specify the name of your script, including any required arguments.

5. Tell Splunk how often you want to run the script by specifying the desired interval in the Interval field.

6. Optionally, you can tell Splunk to override the default source value for your script, by putting a string into the Source name override field.

7. You can also set the sourcetype of the events generated by this script by choosing From list in the Set sourcetype drop-down, then selecting the desired choice from the Select source type from list drop-down. Or, choose Manually from "Set sourcetype," and then enter a string in the Source type field that appears.

You can usually leave the other fields unchanged, including the fields under the More settings option. Look here for detailed information on these fields.

8. Click Save.

9. From the Success page, click Search to start searching. You can enter any term that’s in your data, or you can click on a source, source type or host to see data from the different directories within your syslog directory, the different types of data in those directories, or the different hosts that sent the syslog data in the first place.

For more information on getting data from scripts into Splunk, see "Get data from APIs and other remote data interfaces through scripted inputs" in this manual.

This documentation applies to the following versions of Splunk: 4.2 , 4.2.1 , 4.2.2 , 4.2.3 , 4.2.4 , 4.2.5 , 4.3 , 4.3.1 , 4.3.2 , 4.3.3 , 4.3.4 , 4.3.5 , 4.3.6 , 5.0 , 5.0.1 , 5.0.2 View the Article History for its revisions.


You must be logged into splunk.com in order to post comments. Log in now.

Was this documentation topic helpful?

If you'd like to hear back from us, please provide your email address:

We'd love to hear what you think about this topic or the documentation as a whole. Feedback you enter here will be delivered to the documentation team.

Feedback submitted, thanks!