Configure inputs for the Splunk Add-on for JMX using .conf files¶
You can configure inputs manually by configuring jmx_tasks.conf file.
Create a stanza in jmx_tasks.conf¶
- In your Splunk platform instance, navigate to
$SPLUNK_HOME/etc/apps/Splunk_TA_jmx/local. - Create a
jmx_tasks.conffile, if it does not already exist. - Open the
jmx_tasks.conffile in a text editor. -
In a text editor, edit the
jmx_tasks.conffile to create a task. See the following example:[test_task] description = Test Task destinationapp = Splunk_TA_jmx index = default interval = 60 servers = Splunk_TA_jmx:server1 | Splunk_TA_jmx:server2 sourcetype = jmx templates = Splunk_TA_jmx:test | Splunk_TA_ibm-was:WebSphere_AB_AlarmManager_Attributes -
This input is enabled by default. In order to disable it, add a
disabled = 1line to the bottom of the stanza. -
Adjust or add other arguments as needed. See the guidelines in the following table for reference:
Argument Description descriptionThe description for the configured stanza. It may contain any free-form string and is provided for the convenience and readability of the user. destinationappThe name of the app where this stanza is configured. Keep its value as Splunk_TA_jmx.indexThe index to use for events collected through this add-on. Add this argument to specify a non-default index. The default index is main.intervalHow long Splunk Enterprise waits before collecting data again, in seconds. Note that an interval configured at the server level overrides this input-level configuration for that specific server. serversEnter the name of the servers from which the data should be collected in the format <destinationapp>:<server_name>, wheredestinationappis the Destination App parameter andserver_nameis the Name parameter of the configured server. As shown in the sample above, multiple servers should be separated by pipe symbol. Note: If the Connection Type parameter of the server is IBMsoap, only a single server should be entered per stanza as separate property files (soap.client.propsandssl.client.props) are required to make connection to a single IBM WAS server. Multiple inputs will have to be configured to collect data from multiple servers.sourcetypeThe source type to use for events collected through this add-on. The default is jmx.templatesEnter the name of the templates to define the Mbeans from which the data should be collected in the format <destinationapp>:<template_name>, wheredestinationappis the Destination App parameter andtemplate_nameis the Name parameter of the configured template. As shown in the sample above, multiple templates should be separated by pipe symbol.Note
The name for every stanza must be unique.
-
Save your changes.
- Once the stanza is configured with accurate information, a corresponding stanza is created in
inputs.conf, along with the configuration XML file, and the modular input will start to collect data.
Enable or disable storing configuration in another add-on¶
By default, this add-on is configured to store configuration in another add-on. To disable this feature — which hides the Destination App selection box on the input, servers and template pages in Splunk Web — complete this step:
- In your local
splunk_ta_jmx_settings.conffile, set thedisplay_destination_appsetting to0.