<?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: How do you override &amp;quot;source&amp;quot; on a oneshot? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-override-quot-source-quot-on-a-oneshot/m-p/27847#M4702</link>
    <description>&lt;P&gt;When you say "Before 4.2" is this due to a defect/bug in 4.2, or a change in how Splunk 4.2 works?&lt;/P&gt;</description>
    <pubDate>Sat, 23 Jul 2011 02:14:09 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2011-07-23T02:14:09Z</dc:date>
    <item>
      <title>How do you override "source" on a oneshot?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-override-quot-source-quot-on-a-oneshot/m-p/27844#M4699</link>
      <description>&lt;P&gt;I'm using oneshot to do a one-time import of data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk add oneshot $(pwd)/mydata -sourcetype mytype -index main
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I am unable to to specify a &lt;CODE&gt;source&lt;/CODE&gt; override for the data. I want a custom value instead of the default filepath/filename. I tried this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk add oneshot $(pwd)/mydata -sourcetype mytype -index main -source mysource
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But this generate an error&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Only one "name" parameter can be specified.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Aug 2010 03:32:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-override-quot-source-quot-on-a-oneshot/m-p/27844#M4699</guid>
      <dc:creator>Ron_Naken</dc:creator>
      <dc:date>2010-08-11T03:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do you override "source" on a oneshot?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-override-quot-source-quot-on-a-oneshot/m-p/27845#M4700</link>
      <description>&lt;P&gt;Use &lt;CODE&gt;-rename-source&lt;/CODE&gt; like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk add oneshot $(pwd)/mydata -sourcetype mytype -index main -rename-source mysource
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This was a known issue (SPL-32358) and was fixed in Splunk 4.2.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2010 04:26:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-override-quot-source-quot-on-a-oneshot/m-p/27845#M4700</guid>
      <dc:creator>V_at_Splunk</dc:creator>
      <dc:date>2010-08-11T04:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do you override "source" on a oneshot?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-override-quot-source-quot-on-a-oneshot/m-p/27846#M4701</link>
      <description>&lt;P&gt;Before 4.2, you should be able to override the source by adding a line like this to the beginning of your log file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;***SPLUNK*** source=mysource
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Of course this works for &lt;CODE&gt;sourcetype&lt;/CODE&gt;, &lt;CODE&gt;host&lt;/CODE&gt;, and &lt;CODE&gt;index&lt;/CODE&gt; too.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Aug 2010 04:45:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-override-quot-source-quot-on-a-oneshot/m-p/27846#M4701</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-08-14T04:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do you override "source" on a oneshot?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-override-quot-source-quot-on-a-oneshot/m-p/27847#M4702</link>
      <description>&lt;P&gt;When you say "Before 4.2" is this due to a defect/bug in 4.2, or a change in how Splunk 4.2 works?&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2011 02:14:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-override-quot-source-quot-on-a-oneshot/m-p/27847#M4702</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-07-23T02:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do you override "source" on a oneshot?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-override-quot-source-quot-on-a-oneshot/m-p/27848#M4703</link>
      <description>&lt;P&gt;According to V_at_Splunk, in 4.2, you should be able to use a new parameter called &lt;CODE&gt;-rename-source&lt;/CODE&gt;, and therefore this work around shouldn't be necessary.  (This should still work in 4.2.  That said, I'm not sure if the new &lt;CODE&gt;HEADER_MODE&lt;/CODE&gt; props.conf setting will have any impact on this or not.)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:46:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-override-quot-source-quot-on-a-oneshot/m-p/27848#M4703</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2020-09-28T09:46:42Z</dc:date>
    </item>
  </channel>
</rss>

