<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Feed inputs as command line argument in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Feed-inputs-as-command-line-argument/m-p/330953#M61323</link>
    <description>&lt;P&gt;Thanks, but that will actually write into the same inputs.conf file and Splunk will be taking inputs from that path. What I was actually asking is whether it is possible to provide an input as command line argument while running the Splunk or not? Like for Python when we compile a file we do $python filename, similarly, can we do something like $splunk filename? &lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2017 16:48:53 GMT</pubDate>
    <dc:creator>the_scissor</dc:creator>
    <dc:date>2017-06-09T16:48:53Z</dc:date>
    <item>
      <title>Feed inputs as command line argument</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Feed-inputs-as-command-line-argument/m-p/330951#M61321</link>
      <description>&lt;P&gt;Is it possible to provide inputs to Splunk through command line argument (similar to python for compiling)? Instead of providing the path of the file/directory in inputs.conf, can we provide an input to it using command line argument while running the Splunk binary? &lt;BR /&gt;
So, if I'll have to search for a string, can I do something like : ./splunk cmd searchtest "string" &lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 00:09:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Feed-inputs-as-command-line-argument/m-p/330951#M61321</guid>
      <dc:creator>the_scissor</dc:creator>
      <dc:date>2017-06-09T00:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Feed inputs as command line argument</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Feed-inputs-as-command-line-argument/m-p/330952#M61322</link>
      <description>&lt;P&gt;Yes, you can feed inputs using cmd line - &lt;BR /&gt;
to add a feed of /var/log directory (all files under this directory) - &lt;BR /&gt;
&lt;PRE&gt;$SPLUNK_HOME/bin/splunk add monitor /var/log/ &lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;internally this command updates the inputs.conf file. editing/updating this config file directly will more options. &lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.6.1/Data/Configureyourinputs"&gt;https://docs.splunk.com/Documentation/Splunk/6.6.1/Data/Configureyourinputs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 03:54:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Feed-inputs-as-command-line-argument/m-p/330952#M61322</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-06-09T03:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Feed inputs as command line argument</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Feed-inputs-as-command-line-argument/m-p/330953#M61323</link>
      <description>&lt;P&gt;Thanks, but that will actually write into the same inputs.conf file and Splunk will be taking inputs from that path. What I was actually asking is whether it is possible to provide an input as command line argument while running the Splunk or not? Like for Python when we compile a file we do $python filename, similarly, can we do something like $splunk filename? &lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 16:48:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Feed-inputs-as-command-line-argument/m-p/330953#M61323</guid>
      <dc:creator>the_scissor</dc:creator>
      <dc:date>2017-06-09T16:48:53Z</dc:date>
    </item>
  </channel>
</rss>

