Getting Data In

How to configure multi-value parameters for a Modular Input?

curtisb1024
Path Finder

I'm building a Modular Input and I need to accept an arbitrary number of values for a given parameter. The SDKs seem support this via multi-value parameters (see param_list in this sample input definition):

<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>

The problem is, I can't seem to figure out how to configure my stanzas in inputs.conf and input.conf.spec to cause parameters to be passed to my modular input in this format. All of the SDKs seem to support multi-value parameters, but I've not been able to find any documentation on how to actually set the parameters.

In my inputs.conf I've tried:

someParameter = value1;value2

someParameter = value1,value2

someParameter = "value1";"value2"

someParameter = "value1","value2"

someParameter = value1
someParameter = value2

someParameter1 = value1
someParameter2 = value2

But none of these work. How do I pass parameters from inputs.conf to a modular input as a multi-value parameter list (param_list)?

igor
Splunk Employee
Splunk Employee

To way to tell Splunk to split configuration parameters into a list of parameters is via the introspection XML scheme. For example, on Windows, the perfmon input uses this feature:

b:\>%splunk_home%\etc\system\bin\perfmon.cmd --scheme
<scheme>
[...skipped...]
            <arg name="counters">
                <title>counters</title>
                <list_delimiter>;</list_delimiter>
                <required_on_create>false</required_on_create>
            </arg>

The presence of "list_delimiter" tells Splunk that "counters" is a multi-value parameter, and that the delimiter is ";". This will cause the configuration setting to be split by that delimiter.

Get Updates on the Splunk Community!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

February 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...