<?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: Ingest time lookup to add fields does not work in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Ingest-time-lookup-to-add-fields-does-not-work/m-p/746149#M118585</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/172811"&gt;@patelmc&lt;/a&gt;&amp;nbsp;If the application field is a search-time extracted field it's unavailable during ingest-time processing. If you want to use it during indexing you have to first extract it as an indexed field (and can subsequently forget it so that it doesn't get indexed).&lt;/P&gt;&lt;P&gt;Bonus points question - why extracting those indexed fields?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/310116"&gt;@victor1004k&lt;/a&gt;&amp;nbsp;Don't put settings in system/local. Put them into a separate app so they're easier to maintain.&lt;/P&gt;</description>
    <pubDate>Wed, 14 May 2025 05:52:02 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2025-05-14T05:52:02Z</dc:date>
    <item>
      <title>Ingest time lookup to add fields does not work</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingest-time-lookup-to-add-fields-does-not-work/m-p/574108#M101512</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I need to use federated search which does not support search time lookup at this time in splunk 8.2.2.1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I came across splunk doc to add fields at ingest time (index time) based on ingest time lookup.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.3/Data/IngestLookups" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;https://docs.splunk.com/Documentation/Splunk/8.2.3/Data/IngestLookups&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I am trying to do is during event ingestion I am looking for value of field "application" and match that with the CSV file as shown below and trying to add fields APP and COMP based on application value.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;e.g. if incoming event has application=Linux add APP field with value 9001 and COMP field as 8001.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But it does not work.&amp;nbsp; Please help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here are the following files I created as documented.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;more /opt/splunk/etc/system/lookups/APP_COMP.csv&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;BR /&gt;application,APP,COMP&lt;BR /&gt;Linux,9001,8001&lt;BR /&gt;Console,9002,8002&lt;BR /&gt;Windows,9003,8003&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;more /opt/splunk/etc/system/local/props.conf&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;BR /&gt;&amp;nbsp;[access_combine_wcookie]&lt;BR /&gt;TRANSFORMS = Active_Events&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;/opt/splunk/etc/system/local/transforms.conf&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;BR /&gt;[Active_Events]&lt;BR /&gt;INGEST_EVAL= &lt;FONT color="#0000FF"&gt;APPCOMP&lt;/FONT&gt;=lookup("APP_COMP.csv", json_object("application", application), json_array("APP", "COMP"))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;more /opt/splunk/etc/system/local/fields.conf&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;BR /&gt;[APP]&lt;BR /&gt;INDEXED = True&lt;BR /&gt;[COMP]&lt;BR /&gt;INDEXED = True&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 00:51:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingest-time-lookup-to-add-fields-does-not-work/m-p/574108#M101512</guid>
      <dc:creator>patelmc</dc:creator>
      <dc:date>2021-11-09T00:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Ingest time lookup to add fields does not work</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingest-time-lookup-to-add-fields-does-not-work/m-p/746147#M118584</link>
      <description>&lt;P&gt;[Solution]&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/172811"&gt;@patelmc&lt;/a&gt;&amp;nbsp; You can achieve the desired result by modifying the content below slightly.&lt;/P&gt;&lt;P&gt;1. /opt/splunk/etc/apps/myapp/local/transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[Active_Events]
INGEST_EVAL= application=replace(_raw, ".*application=(\w+).*", "\1"), APP=json_extract(lookup("APP_COMP.csv", json_object("application", application), json_array("APP")),"APP"), COMP=json_extract(lookup("APP_COMP.csv", json_object("application", application), json_array("COMP")),"COMP")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;2. Result&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ingest-time-lookup-for-web-log.jpg" style="width: 607px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/39003iB5D52F29CB4D5220/image-size/large?v=v2&amp;amp;px=999" role="button" title="ingest-time-lookup-for-web-log.jpg" alt="ingest-time-lookup-for-web-log.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 09:05:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingest-time-lookup-to-add-fields-does-not-work/m-p/746147#M118584</guid>
      <dc:creator>victor1004k</dc:creator>
      <dc:date>2025-05-26T09:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Ingest time lookup to add fields does not work</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingest-time-lookup-to-add-fields-does-not-work/m-p/746149#M118585</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/172811"&gt;@patelmc&lt;/a&gt;&amp;nbsp;If the application field is a search-time extracted field it's unavailable during ingest-time processing. If you want to use it during indexing you have to first extract it as an indexed field (and can subsequently forget it so that it doesn't get indexed).&lt;/P&gt;&lt;P&gt;Bonus points question - why extracting those indexed fields?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/310116"&gt;@victor1004k&lt;/a&gt;&amp;nbsp;Don't put settings in system/local. Put them into a separate app so they're easier to maintain.&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 05:52:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingest-time-lookup-to-add-fields-does-not-work/m-p/746149#M118585</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-05-14T05:52:02Z</dc:date>
    </item>
  </channel>
</rss>

