<?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: Field extractions don't work for forwarded input from Universal Forwarder in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119562#M24869</link>
    <description>&lt;P&gt;Thanks for your quick and accurate response.  This solves the problem!  And your additional answer makes sense for the second question I snuck in there.&lt;/P&gt;

&lt;P&gt;Clearly, I need to read more of the manual, and spend less time tweaking files created from clicking around on the web pages!&lt;/P&gt;</description>
    <pubDate>Wed, 10 Sep 2014 21:31:41 GMT</pubDate>
    <dc:creator>jordansamuels_h</dc:creator>
    <dc:date>2014-09-10T21:31:41Z</dc:date>
    <item>
      <title>Field extractions don't work for forwarded input from Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119559#M24866</link>
      <description>&lt;P&gt;I have a custom source type and field extractions which work perfectly well when indexed locally on the Splunk Enterprise server (indexer + search head).  However, when the same type of input is forwarded from a UF, the extractions don't work.&lt;/P&gt;

&lt;P&gt;On the Splunk Enterprise server (Splunk 6.1.3 (build 220630) on RH 6.5), /apps/splunk/splunk/etc/system/local/props.conf has this stanza:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[test_pipe_2]
FIELD_DELIMITER = |
FIELD_NAMES = time,c1,c2  
HEADER_FIELD_DELIMITER = |
INDEXED_EXTRACTIONS = psv
KV_MODE = none
NO_BINARY_CHECK = 1
SHOULD_LINEMERGE = false
pulldown_type = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On the UF (Splunk Universal Forwarder 6.1.3 (build 220630) on RH 6.4), /opt/splunkforwarder/etc/system/local/inputs.conf has this stanza:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///tmp/testme]
disabled = false
index = myindex
sourcetype = test_pipe_2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I put files in /tmp/testme that look like below, I get events in searching for index=myindex and they do have sourcetype test_pipe_2, but the fields c1 and c2 are not extracted.  &lt;/P&gt;

&lt;P&gt;However, when I put similar text in a file on the Enterprise server (indexer+search head) and index it with sourcetype test_pipe_2, it has the fields.&lt;/P&gt;

&lt;P&gt;Sample input:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Wed Sep 10 10:14:01 CDT 2014|apple|pear
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that I have also tried placing the same stanza in /opt/splunkforwarder/etc/apps/search/local/inputs.conf on the UF, same result.&lt;/P&gt;

&lt;P&gt;What am I doing wrong?&lt;/P&gt;

&lt;P&gt;Another experiment: when I purposely misspell the sourcetype on the UF inputs.conf, to a non-existent sourcetype, it still gets indexed and just shows up in searches as that sourcetype.  I'm not sure what that implies but it seems interesting.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:32:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119559#M24866</guid>
      <dc:creator>jordansamuels_h</dc:creator>
      <dc:date>2020-09-28T17:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Field extractions don't work for forwarded input from Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119560#M24867</link>
      <description>&lt;P&gt;This syntax is only used to create index-time field extractions in &lt;CODE&gt;props.conf&lt;/CODE&gt; on a forwarder&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FIELD_DELIMITER = |
FIELD_NAMES = time,c1,c2  
HEADER_FIELD_DELIMITER = |
INDEXED_EXTRACTIONS = psv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can't do this in &lt;CODE&gt;props.conf&lt;/CODE&gt; on an indexer! (Well, actually you &lt;EM&gt;can&lt;/EM&gt; do this on an indexer but only for data that is collected locally on the indexer - not on data that was forwarded to the indexer.)&lt;/P&gt;

&lt;P&gt;On the indexer, you want to create search-time field extractions, using this syntax:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[test_pipe_2]
REPORT-r1 = extract-test-pipe-fields
# other stuff is fine
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract-test-pipe-fields]
DELIMS = "|"
FIELDS=time,c1,c2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can put &lt;CODE&gt;props.conf&lt;/CODE&gt; and &lt;CODE&gt;transforms.conf&lt;/CODE&gt; in &lt;CODE&gt;etc/system/local&lt;/CODE&gt; or &lt;CODE&gt;etc/apps/search/local&lt;/CODE&gt; - it doesn't matter. I would put them both in the same directory to avoid confusion later.&lt;/P&gt;

&lt;P&gt;To answer "another experiment" - When you set a sourcetype in &lt;CODE&gt;inputs.conf&lt;/CODE&gt;, that IS the sourcetype that is assigned. Splunk does not have a concept of an "invalid" sourcetype. The sourcetype is whatever you say it is.&lt;/P&gt;

&lt;P&gt;(But you &lt;EM&gt;can&lt;/EM&gt; override the sourcetype that was set on the UF. Although the appropriate fix is to spell it right in &lt;CODE&gt;inputs.conf&lt;/CODE&gt;!)&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2014 16:49:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119560#M24867</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-09-10T16:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Field extractions don't work for forwarded input from Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119561#M24868</link>
      <description>&lt;P&gt;Oh, or you could just move your original stuff back to &lt;CODE&gt;props.conf&lt;/CODE&gt; on the UF&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;FIELD_DELIMITER = |&lt;BR /&gt;
FIELD_NAMES = time,c1,c2&lt;BR /&gt;
HEADER_FIELD_DELIMITER = |&lt;BR /&gt;
INDEXED_EXTRACTIONS = psv&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Leaving everything else as it is in &lt;CODE&gt;props.conf&lt;/CODE&gt; on the indexer.&lt;/P&gt;

&lt;P&gt;[edited to correct where I said &lt;CODE&gt;inputs.conf&lt;/CODE&gt; instead of &lt;CODE&gt;props.conf&lt;/CODE&gt;]&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2014 16:50:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119561#M24868</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-09-10T16:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Field extractions don't work for forwarded input from Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119562#M24869</link>
      <description>&lt;P&gt;Thanks for your quick and accurate response.  This solves the problem!  And your additional answer makes sense for the second question I snuck in there.&lt;/P&gt;

&lt;P&gt;Clearly, I need to read more of the manual, and spend less time tweaking files created from clicking around on the web pages!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2014 21:31:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119562#M24869</guid>
      <dc:creator>jordansamuels_h</dc:creator>
      <dc:date>2014-09-10T21:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Field extractions don't work for forwarded input from Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119563#M24870</link>
      <description>&lt;P&gt;@lguinn now I'm confused again.  Your comment "just move original stuff back to &lt;CODE&gt;inputs.conf&lt;/CODE&gt; on the UF" seems to imply that's were it was in the first place; but I had it in props.conf on the indexer/searcher.  The reason it was there, by the way, is that Splunk itself put it there, when I created a new custom sourcetype via Splunk Web.  That also makes me confused on second reading of your answer where you say "you can't do this in props.conf!"  Splunk itself thinks I can (since it put it there!).&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2014 12:49:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119563#M24870</guid>
      <dc:creator>jordansamuels_h</dc:creator>
      <dc:date>2014-09-12T12:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Field extractions don't work for forwarded input from Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119564#M24871</link>
      <description>&lt;P&gt;@lguinn - also, seem like &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.3/Data/Extractfieldsfromfileheadersatindextime"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.3/Data/Extractfieldsfromfileheadersatindextime&lt;/A&gt; implies that those directives &lt;EM&gt;can&lt;/EM&gt; go in &lt;CODE&gt;props.conf&lt;/CODE&gt;, at least in certain contexts.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2014 12:52:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119564#M24871</guid>
      <dc:creator>jordansamuels_h</dc:creator>
      <dc:date>2014-09-12T12:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Field extractions don't work for forwarded input from Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119565#M24872</link>
      <description>&lt;P&gt;Oh, what a typo! You are right, it doesn't go in &lt;CODE&gt;inputs.conf&lt;/CODE&gt;, it goes in &lt;CODE&gt;props.conf&lt;/CODE&gt;!!&lt;/P&gt;

&lt;P&gt;[I've corrected my comment above - hopefully anyone who reads the whole thread won't be confused]&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2014 21:31:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119565#M24872</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-09-12T21:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Field extractions don't work for forwarded input from Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119566#M24873</link>
      <description>&lt;P&gt;@lguinn, I'm grateful for your continued attention to my questions.  If you're saying that &lt;CODE&gt;props.conf&lt;/CODE&gt; goes on the UF, I'm not sure I understand &lt;A href="http://answers.splunk.com/answers/27373/universal-forwarder-and-props-conf-and-transforms-conf.html"&gt;this answer&lt;/A&gt; , which seems to indicate that it does not.  Also, I tried this in a similar situation and it didn't seem to have any effect.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2014 14:30:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119566#M24873</guid>
      <dc:creator>jordansamuels_h</dc:creator>
      <dc:date>2014-09-15T14:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Field extractions don't work for forwarded input from Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119567#M24874</link>
      <description>&lt;P&gt;&lt;CODE&gt;props.conf&lt;/CODE&gt; goes on the UF, on the indexer, on the search head - pretty much everywhere! HOWEVER, not all of the settings apply to the UF (or the indexer, etc.).  So you may have props.conf on the UF - but certain settings will be ignored on the UF, because it only performs the "input phase." This article will probably clear things up for you: &lt;A href="http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F"&gt;Where do I configure my Splunk settings?&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2014 23:56:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Field-extractions-don-t-work-for-forwarded-input-from-Universal/m-p/119567#M24874</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-09-15T23:56:41Z</dc:date>
    </item>
  </channel>
</rss>

