<?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 How do I add fields to incoming data? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-fields-to-incoming-data/m-p/428022#M74978</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I'm trying to load a CSV file using the universal forwarder, and there are no headers in the CSV file. How can I give column names to those values in the file? Can I do that at props.conf? I don't want to use the extract field option... &lt;/P&gt;

&lt;P&gt;eg : file.csv as below values &lt;/P&gt;

&lt;P&gt;1,2,3,4,5&lt;BR /&gt;
6,7,8,9,10&lt;BR /&gt;
11,12,13,14,15&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jan 2019 02:02:34 GMT</pubDate>
    <dc:creator>raghu0463</dc:creator>
    <dc:date>2019-01-25T02:02:34Z</dc:date>
    <item>
      <title>How do I add fields to incoming data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-fields-to-incoming-data/m-p/428022#M74978</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I'm trying to load a CSV file using the universal forwarder, and there are no headers in the CSV file. How can I give column names to those values in the file? Can I do that at props.conf? I don't want to use the extract field option... &lt;/P&gt;

&lt;P&gt;eg : file.csv as below values &lt;/P&gt;

&lt;P&gt;1,2,3,4,5&lt;BR /&gt;
6,7,8,9,10&lt;BR /&gt;
11,12,13,14,15&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 02:02:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-fields-to-incoming-data/m-p/428022#M74978</guid>
      <dc:creator>raghu0463</dc:creator>
      <dc:date>2019-01-25T02:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add fields to incoming data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-fields-to-incoming-data/m-p/428023#M74979</link>
      <description>&lt;P&gt;@raghu0463 ,&lt;/P&gt;

&lt;P&gt;You can configure them in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your sourcetype for csv file]
FIELD_NAMES =field1,field2,.....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf#Structured_Data_Header_Extraction_and_configuration"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf#Structured_Data_Header_Extraction_and_configuration&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 03:39:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-fields-to-incoming-data/m-p/428023#M74979</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-01-25T03:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add fields to incoming data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-fields-to-incoming-data/m-p/428024#M74980</link>
      <description>&lt;P&gt;how does it identifies from which source and file ? if I just mention only csv &lt;/P&gt;

&lt;P&gt;i.e &lt;BR /&gt;
[csv]&lt;BR /&gt;
FIELD_NAMES = A,B,C,D,E&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2019 05:19:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-fields-to-incoming-data/m-p/428024#M74980</guid>
      <dc:creator>raghu0463</dc:creator>
      <dc:date>2019-01-25T05:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add fields to incoming data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-fields-to-incoming-data/m-p/428025#M74981</link>
      <description>&lt;P&gt;@raghu0463 , thats what meant by &lt;CODE&gt;[your sourcetype for csv file]&lt;/CODE&gt;. You need to set a sourcetype for your file based on the content. Or you can use source/host in the &lt;CODE&gt;SPEC&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Common &lt;CODE&gt;SPEC&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[&amp;lt;spec&amp;gt;]
* This stanza enables properties for a given &amp;lt;spec&amp;gt;.
* A props.conf file can contain multiple stanzas for any number of
  different &amp;lt;spec&amp;gt;.
* Follow this stanza name with any number of the following setting/value
  pairs, as appropriate for what you want to do.
* If you do not set an setting for a given &amp;lt;spec&amp;gt;, the default is used.

&amp;lt;spec&amp;gt; can be:
1. &amp;lt;sourcetype&amp;gt;, the source type of an event.
2. host::&amp;lt;host&amp;gt;, where &amp;lt;host&amp;gt; is the host, or host-matching pattern, for an
                 event.
3. source::&amp;lt;source&amp;gt;, where &amp;lt;source&amp;gt; is the source, or source-matching
                     pattern, for an event.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Jan 2019 06:43:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-fields-to-incoming-data/m-p/428025#M74981</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-01-25T06:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add fields to incoming data?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-fields-to-incoming-data/m-p/428026#M74982</link>
      <description>&lt;P&gt;if you want to define the stanza by the source file name you can use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/path/to/file.csv]
FIELD_NAMES = A,B,C,D,E
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Jan 2019 09:58:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-add-fields-to-incoming-data/m-p/428026#M74982</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-01-25T09:58:27Z</dc:date>
    </item>
  </channel>
</rss>

