Splunk® Supported Add-ons

Splunk Add-on for Java Management Extensions

Acrobat logo Download manual as PDF


Acrobat logo Download topic as PDF

Configure inputs for the Splunk Add-on for JMX in Splunk Web

The Splunk Add-on for Java Management Extensions (JMX) collects data using a modular input. Configure this input using Splunk Web on the data collection node (best practice) or manually using the configuration files.

Configure inputs through Splunk Web

Access the input configuration in Splunk Web on your data collection node, usually a heavy forwarder, by going to Apps > Manage Apps, then clicking Launch app in the row for Splunk Add-on for JMX.

There are three parts of the input configuration: Servers, Templates, and Tasks. Toggle between them using the Configurations menu in the upper left of the screen.

Configure servers

  1. Click Add Server to provide connection details for a JMX server.
  2. Keep the default Destination App to associate the server with the Splunk Add-on for JMX.
  3. Provide a Name and JVM Description to help identify this server. The description is optional metadata which Splunk Enterprise sets as the value for the field jvmDescription in your events.
  4. Select a Connection Type and fill in the required fields, described in the table below. The three options under Attach to process are for local JMX servers only. See Connect to a local JVM using a process ID for setup instructions. You can select a Specific protocol for either local or remote servers. Note: In all connection type options, you do not need to fill in a username and password unless your JMX server is protected by authentication. The add-on does not require values for these fields. If you provide a password and return later to make changes, the field is blank and you must re-enter the password before saving.
    Category Connection Type Description
    Attach to process Customized script At runtime, the add-on runs the executable shell script (or bat file on Windows) that you specify in Script Path. You must have privileges to execute the script. The script should print several lines, each line representing a JVM process. A line can be either a Process ID or a Process ID followed by a comma (",") and a jvmDescription which does not contain a comma.
    Process id At runtime, the add-on attaches to the Process ID that you specify here. See Get process id from service name.
    Process file At runtime, the add-on reads the first line of the file that you specify in the File Path to find the Process ID of your JVM.
    Specific protocol Use url directly The add-on accesses your local or remote JVM server using the raw JMX service URL in the standard format: service:jmx:protocol:sap. Fill in the URL, Username, and Password.
    rmi The add-on uses Remote Method Invocation (RMI) to connect to your JMX server using system properties. Select a Stub Source and fill in the required fields. For jndi, provide a Host, Port, and Lookup Path. For ior or stub, provide the Encoded Stub, Username, and Password.
    iiop The add-on uses Java Remote Method Invocation (RMI) interface over the Internet Inter-Orb Protocol (IIOP) to connect to your JMX server using system properties. Select a Stub Source and fill in the required fields. For jndi, provide a Host, Port, and Lookup Path. For ior or stub, provide the Encoded Stub, Username, and Password.
    soap The add-on uses the soap MX4J JMX connector to connect to your JMX server. Fill in the Host, Port, Lookup Path, Username, and Password.
    IBMsoap The add-on uses IBM API to connect to your IBM Websphere Application Server (WAS) using Simple Object Access Protocol (SOAP) protocol. Fill in the Host, Port, Username, and Password. Follow the prerequisite steps Connect to IBM Websphere Application Server (WAS) through SOAP protocol before you configure your server using this Connection Type.
    soap+ssl The add-on uses the soap MX4J JMX connector to connect to your JMX server with SSL. Fill in the Host, Port, Lookup Path, Username, and Password.
    hessian The add-on uses the hessian MX4J JMX connector to connect to your JMX server. Fill in the Host, Port, Lookup Path, Username, and Password.
    hessian+ssl The add-on uses the hessian MX4J JMX connector to connect to your JMX server with SSL. Fill in the Host, Port, Lookup Path, Username, and Password.
    burlap The add-on uses the burlap MX4J JMX connector to connect to your JMX server. Fill in the Host, Port, Lookup Path, Username, and Password.
    burlap+ssl The add-on uses the burlap MX4J JMX connector to connect to your JMX server with SSL. Fill in the Host, Port, Lookup Path, Username, and Password.
  5. Optionally, fill in a value in Server Interval to specify the collection interval for this server, in seconds. This value overrides the interval of the task that contains this server, but only for this server. Any other servers in the same task still follow the interval set in the task.
  6. Click Create. Continue to add additional servers until you have configured connection details for all of the JMX servers from which you want the add-on to extract data.

Configure templates

A template describes a group of JMX MBeans from which the add-on should pull data.

To create a new template, follow these steps.

  1. Click Configurations > Templates to access the template configuration screen.
  2. Click Add Template to create a new template.
  3. Keep the default Destination App to associate the template with the Splunk Add-on for JMX.
  4. Give your template a Name using only alphanumeric characters and underscores.
  5. Enter a brief Description for your template to indicate its function.
  6. In the Content field, enter one or more MBean configurations in XML format. For detailed guidance on how to structure the MBean configurations, see MBean configuration XML reference, below on this page.
  7. Click Create. You can now apply this template to one or more tasks by following the instructions in the following section.

The add-on includes three predefined templates. The Predefined_Get_All_Template contains MBean configurations that instruct the add-on to pull all Attributes.

<mbean domain="*" properties="*" dumpAllAttributes="true" ></mbean>

The Predefined_JVM_Template contains a set of MBean configurations that poll for specific Attributes. You can copy and paste the content of this template into a new template, then edit to match your specific use case.

<mbean domain="java.lang" properties="type=Threading">

<!-- simple attributes -->
<attribute name="TotalStartedThreadCount" outputname="started"/>
<attribute name="ThreadCpuTimeSupported" outputname="cpuTimeSupported"/>
<attribute name="ThreadCpuTimeEnabled" outputname="cpuTimeEnabled"/>
<attribute name="ThreadCount" outputname="count"/>
<attribute name="ThreadContentionMonitoringSupported" outputname="cmSupported"/>
<attribute name="ThreadContentionMonitoringEnabled" outputname="cmEnabled"/>
<attribute name="SynchronizerUsageSupported" outputname="synchSupported"/>
<attribute name="PeakThreadCount" outputname="peak"/>
<attribute name="ObjectMonitorUsageSupported" outputname="omuSupported"/>
<attribute name="DaemonThreadCount" outputname="daemonCount"/>
<attribute name="CurrentThreadUserTime" outputname="currentUserTime"/>
<attribute name="CurrentThreadCpuTimeSupported" outputname="cpuTimeSupported"/>
<attribute name="CurrentThreadCpuTime" outputname="currentCPUTime"/>

</mbean>

<mbean domain="java.lang" properties="type=Runtime">

<!-- tabular attributes -->
<attribute name="SystemProperties:user.timezone:value" outputname="timezone"/>
<attribute name="SystemProperties:java.vm.vendor:value" outputname="jvmVendor"/>

<!-- simple attributes -->
<attribute name="VmVersion" outputname="jvmVersion"/>
<attribute name="VmVendor" outputname="jvmVendor"/>
<attribute name="VmName" outputname="jvmName"/>
<attribute name="Uptime" outputname="jvmUptime"/>
<attribute name="StartTime" outputname="startedAt"/>
<attribute name="Name" outputname="jvmProcessName"/>

<!-- simple array attribute -->
<attribute name="InputArguments" outputname="inputArgs"/>

</mbean>

<mbean domain="java.lang" properties="type=OperatingSystem">

<!-- simple attributes -->
<attribute name="Version" outputname="version"/>
<attribute name="TotalSwapSpaceSize" outputname="swapSpace"/>
<attribute name="TotalPhysicalMemorySize" outputname="physMem"/>
<attribute name="SystemLoadAverage" outputname="sysLoad"/>
<attribute name="ProcessCpuTime" outputname="cpuTime"/>
<attribute name="OpenFileDescriptorCount" outputname="openFD"/>
<attribute name="Name" outputname="name"/>
<attribute name="MaxFileDescriptorCount" outputname="maxFD"/>
<attribute name="FreeSwapSpaceSize" outputname="freeSwap"/>
<attribute name="FreePhysicalMemorySize" outputname="freePhysMem"/>
<attribute name="CommittedVirtualMemorySize" outputname="committed"/>
<attribute name="AvailableProcessors" outputname="processors"/>
<attribute name="Arch" outputname="arch"/>

</mbean>

<mbean domain="java.lang" properties="type=Compilation">

<!-- simple attributes -->
<attribute name="TotalCompilationTime" outputname="time"/>

</mbean>

<mbean domain="java.lang" properties="type=ClassLoading">

<!-- simple attributes -->
<attribute name="TotalLoadedClassCount" outputname="total"/>
<attribute name="LoadedClassCount" outputname="current"/>
<attribute name="UnloadedClassCount" outputname="unloaded"/>

</mbean>

<mbean domain="java.lang" properties="type=Memory">

<!-- composite attributes -->
<attribute name="NonHeapMemoryUsage:used" outputname="nonHeapUsed"/>
<attribute name="NonHeapMemoryUsage:max" outputname="nonHeapMax"/>
<attribute name="NonHeapMemoryUsage:init" outputname="nonHeapInit"/>
<attribute name="NonHeapMemoryUsage:committed" outputname="nonHeapCommitted"/>

<attribute name="HeapMemoryUsage:used" outputname="heapUsed"/>
<attribute name="HeapMemoryUsage:max" outputname="heapMax"/>
<attribute name="HeapMemoryUsage:init" outputname="heapInit"/>
<attribute name="HeapMemoryUsage:committed" outputname="heapCommitted"/>

<attribute name="ObjectPendingFinalizationCount" outputname="objectsPending"/>

</mbean>

<mbean domain="java.lang" properties="type=MemoryPool,name=*">

<attribute name="Name" outputname="name"/>
<attribute name="Type" outputname="memoryType"/>
<attribute name="MemoryManagerNames" outputname="memManagerNames"/>

<attribute name="PeakUsage:used" outputname="peakUsageUsed"/>
<attribute name="PeakUsage:max" outputname="peakUsageMax"/>
<attribute name="PeakUsage:committed" outputname="peakUsageCommitted"/>
<attribute name="PeakUsage:init" outputname="peakUsageInit"/>

<!-- composite attributes -->
<attribute name="CollectionUsage:used" outputname="colUsageUsed"/>
<attribute name="CollectionUsage:max" outputname="colUsageMax"/>
<attribute name="CollectionUsage:committed" outputname="colUsageCommitted"/>
<attribute name="CollectionUsage:init" outputname="colUsageInit"/>

<!-- composite attributes -->
<attribute name="Usage:used" outputname="usageUsed"/>
<attribute name="Usage:max" outputname="usageMax"/>
<attribute name="Usage:committed" outputname="usageCommitted"/>
<attribute name="Usage:init" outputname="usageInit"/>

</mbean>

<mbean domain="java.lang" properties="type=GarbageCollector,name=*">

<!-- simple array attributes -->
<attribute name="Name" outputname="gcName"/>
<attribute name="MemoryPoolNames" outputname="memPools"/>

<!-- simple attributes -->
<attribute name="CollectionTime" outputname="colTime"/>
<attribute name="CollectionCount" outputname="colCount"/>

<!-- composite-simple attributes -->
<attribute name="LastGcInfo:startTime" outputname="gCStart"/>
<attribute name="LastGcInfo:endTime" outputname="gCEnd"/>
<attribute name="LastGcInfo:id" outputname="gCID"/>
<attribute name="LastGcInfo:duration" outputname="gCDuration"/>
<attribute name="LastGcInfo:GcThreadCount" outputname="gCThreadCount"/>

</mbean>

Predefined_IBM_WAS_Performance_Template contains MBean configurations specific to IBM Websphere Application Server (WAS) that instruct the Splunk Add-on for Java Management Extensions to pull data with all the available attributes of the selected Mbeans. These are used to measure the performance of the applications.

<mbean domain="WebSphere" properties="*,type=JDBCProvider,j2eeType=JDBCResource" dumpAllAttributes="true" ></mbean>
<mbean domain="WebSphere" properties="*,type=DataSource,j2eeType=JDBCDataSource" dumpAllAttributes="true" ></mbean>
<mbean domain="WebSphere" properties="*,type=JVM,j2eeType=JVM" dumpAllAttributes="true" ></mbean>
<mbean domain="WebSphere" properties="*,type=J2CResourceAdapter,j2eeType=JCAResource" dumpAllAttributes="true" ></mbean>
<mbean domain="WebSphere" properties="*,type=SessionManager" dumpAllAttributes="true" ></mbean>
<mbean domain="WebSphere" properties="*,type=SystemMetrics" dumpAllAttributes="true" ></mbean>
<mbean domain="WebSphere" properties="*,type=ThreadPool" dumpAllAttributes="true" ></mbean>
<mbean domain="WebSphere" properties="*,type=TransactionService,j2eeType=JTAResource" dumpAllAttributes="true" ></mbean>
<mbean domain="WebSphere" properties="*,type=Servlet,j2eeType=Servlet" dumpAllAttributes="true" ></mbean>
<mbean domain="WebSphere" properties="*,type=JSP" dumpAllAttributes="true" ></mbean>

Configure inputs

A data input is mapped to a task, defined by a set of servers and templates. The add-on polls the selected servers for the data described in the selected templates.

To create a new input, follow these steps.

  1. Click on Inputs tab to access the input configuration screen.
  2. Click on Create New Input to create a new input.
  3. Keep the default Destination App to associate the input with the Splunk Add-on for JMX.
  4. Give the input a Name and a Description to differentiate it from other inputs that you may create.
  5. On the Servers tab, select one or more servers that this input should access for data.
  6. On the Templates tab, select one or more templates that describe the data you want to access.
  7. On the Settings tab, you can adjust the Polling Interval (in seconds), Source Type, and Index, if you wish to change the defaults. The default polling interval is 60 seconds. Note that an interval configured at the server level overrides this input-level configuration for that specific server.
  8. Click Create. The Splunk Add-on for JMX creates the input and enables it by default. To disable the input at any time, click Disable in the row for that input.

Only a single server of '''Connection Type''' IBMsoap can be selected per task as separate property files (soap.client.props and ssl.client.props) are required to connect to a single IBM WAS server. Multiple inputs must be configured to collect data from multiple servers.

Once you have configured your tasks, your inputs are enabled and polling your JMX servers according to the intervals you configured. If you do not see data from your JMX servers in your Splunk Enterprise instance, see the Troubleshooting page.

Last modified on 18 December, 2021
PREVIOUS
Connect the Splunk Add-on for Java Management Extensions to IBM Websphere Application Server
  NEXT
Configure inputs for the Splunk Add-on for JMX using .conf files

This documentation applies to the following versions of Splunk® Supported Add-ons: released


Was this documentation topic helpful?

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

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters