Getting Data In

What is the CLI command to generate input definition for testing modular inputs?

curtisb1024
Path Finder

I know there is a CLI command to generate an Input Definition for testing Modular Inputs, but I cannot seem to find any docs on it. I've searched through the SDKs, online, and nothing in the CLI help stands out. Can anyone point me in the right direction?

The input definition would look something like this:

    <?xml version="1.0" encoding="utf-16"?>
    <input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <server_host>tiny</server_host>
      <server_uri>https://127.0.0.1:8089</server_uri>
      <checkpoint_dir>/opt/splunk/var/lib/splunk/modinputs</checkpoint_dir>
      <session_key>123102983109283019283</session_key>
      <configuration>
        <stanza name="foobar://aaa">
          <param name="param1">value1</param>
          <param name="param2">value2</param>
          <param name="disabled">0</param>
          <param name="index">default</param>
        </stanza>
        <stanza name="foobar://bbb">
          <param name="param1">value11</param>
          <param name="param2">value22</param>
          <param name="disabled">0</param>
          <param name="index">default</param>
          <param_list name="multiValue">
            <value>value1</value>
            <value>value2</value>
          </param_list>
          <param_list name="multiValue2">
            <value>value3</value>
            <value>value4</value>
          </param_list>
        </stanza>
      </configuration>
    </input>
Tags (2)
0 Karma

Damien_Dallimor
Ultra Champion

Example using a twitter stanza :

splunk cmd splunkd print-modinput-config twitter twitter://SplunkTwitter | splunk cmd python $SPLUNK_HOME/etc/apps/twitter/bin/twitter.py
0 Karma

igor
Splunk Employee
Splunk Employee

There is this docs page which may have what you are looking for:
http://docs.splunk.com/Documentation/Splunk/6.1.4/AdvancedDev/ModInputsDevTools

From there you can also browse other modular inputs docs related pages, such as this one, which may be of interest: http://docs.splunk.com/Documentation/Splunk/6.1.4/AdvancedDev/ModInputsSpec .

Does this cover what you need?

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...