<?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_eval lookup not working in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673222#M112758</link>
    <description>&lt;P&gt;Please explain what you mean by "not working".&amp;nbsp; What is the input, what are the expected results, and what are the actual results?&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2024 14:14:37 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2024-01-04T14:14:37Z</dc:date>
    <item>
      <title>ingest_eval lookup not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673189#M112756</link>
      <description>&lt;P&gt;I have the following transforms.conf file:&lt;/P&gt;&lt;PRE&gt;[pan_src_user]&lt;BR /&gt;INGEST_EVAL=src_user_idx=json_extract(lookup("user_ip_mapping.csv",json_object("src_ip", src_ip),json_array(src_user_idx)),"src_user")&lt;/PRE&gt;&lt;P&gt;and props.conf file:&lt;/P&gt;&lt;PRE&gt;[pan:traffic]&lt;BR /&gt;TRANSFORMS-pan_user = pan_src_user&lt;/PRE&gt;&lt;P&gt;user_ip_mapping.csv file sample:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;src_ip&lt;/TD&gt;&lt;TD width="50%"&gt;src_user&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;10.1.1.1&lt;/TD&gt;&lt;TD width="50%"&gt;someuser&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However it's not working - not sure what I'm doing wrong? The src_user_idx field is not showing up in any of the logs&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 05:45:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673189#M112756</guid>
      <dc:creator>Niro</dc:creator>
      <dc:date>2024-01-04T05:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: ingest_eval lookup not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673222#M112758</link>
      <description>&lt;P&gt;Please explain what you mean by "not working".&amp;nbsp; What is the input, what are the expected results, and what are the actual results?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 14:14:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673222#M112758</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-01-04T14:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: ingest_eval lookup not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673302#M112768</link>
      <description>&lt;P&gt;I mean it's not adding the src_user_idx field to the logs - the log files contain a `src_ip` field, so I expect to get a src_user_idx field to get populated, using this search:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=pan_logs sourcetype=pan:traffic earliest=-1m
| fields src_ip,src_user*&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get src_ip but no src_user_idx. I did confirm the src_ip values are in fact in the lookup table&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 04:35:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673302#M112768</guid>
      <dc:creator>Niro</dc:creator>
      <dc:date>2024-01-05T04:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: ingest_eval lookup not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673319#M112769</link>
      <description>&lt;P&gt;1. Did you put the definition in the proper place?&lt;/P&gt;&lt;P&gt;2. Do you have your lookup defined on that component?&lt;/P&gt;&lt;P&gt;3. Most importantly - why would you use json functions when pan:traffic format does not have anything to do with json? (unless you have some completely non-standard configuration we know nothing about).&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 09:06:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673319#M112769</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-01-05T09:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: ingest_eval lookup not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673322#M112770</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;one more. Have you test it on GUI with&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your base search&amp;gt;
|eval src_user_idx = json_extract(lookup("user_ip_mapping.csv",json_object("src_ip", src_ip),json_array(src_user_idx)),"src_user")
| table src*&lt;/LI-CODE&gt;&lt;P&gt;In that way you can validate your INGEST_EVAL expression. &amp;nbsp;And as &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;said there are some other action to do after you have successfully validate it.&lt;/P&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 09:26:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673322#M112770</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-01-05T09:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: ingest_eval lookup not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673365#M112772</link>
      <description>&lt;P&gt;&lt;SPAN&gt;3. Most importantly - why would you use json functions when pan:traffic format does not have anything to do with json? (unless you have some completely non-standard configuration we know nothing about).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have no idea, I was following the some ingest_eval examples and was confused why it was always using json functions, kind of assumed it was just some way splunk was interpreting&amp;nbsp;it in the backend. How else would I go about accomplishing this at ingest?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For the first two questions - it's in system/local and the lookups are globally available&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 14:33:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673365#M112772</guid>
      <dc:creator>Niro</dc:creator>
      <dc:date>2024-01-05T14:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: ingest_eval lookup not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673366#M112773</link>
      <description>&lt;P&gt;This actually DOES work - why isn't it working using the transforms/props files?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 14:35:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673366#M112773</guid>
      <dc:creator>Niro</dc:creator>
      <dc:date>2024-01-05T14:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: ingest_eval lookup not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673370#M112774</link>
      <description>&lt;P&gt;1. As a general rule of thumb - avoid using system/local. It might not have anything to do with this particular case or even not matter much in your environment in general but it's a good practice to split your confiugration into apps and maintain it as apps. system/local is the directory with the highest priority (except for the clustered indexers) and you can get into some undesired situations if you put your settings into system/local and can't later overwrite them with apps. See &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/Wheretofindtheconfigurationfiles" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Admin/Wheretofindtheconfigurationfiles&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. json functions are meant for working with json data. I suppose the examples were meant for json events.&lt;/P&gt;&lt;P&gt;3. I didn't notice it before having concentrated on that json part but your INGEST_EVAL, however you write it, has no chance of working if you base it on search-time extracted fields. Remember that most Splunk extractions are search-time. So in order to use part of the event for your lookup, you need to either find it by means of - for example - substr(), l/rtrim() or replace() or extract it as indexed field in order to be able to use it as argument for INGEST_EVAL (you can later assign null-value to it so it doesn't get indexed in the end).&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 14:51:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/673370#M112774</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-01-05T14:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: ingest_eval lookup not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/677516#M113263</link>
      <description>&lt;P&gt;Hi did you get this working?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 06:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/677516#M113263</guid>
      <dc:creator>Esky73</dc:creator>
      <dc:date>2024-02-14T06:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: ingest_eval lookup not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/677517#M113264</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/258946"&gt;@Niro&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If your issue isn't resolved, it might happen because of sourcetype overwrite on pan logs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;pan:traffic is overridden sourcetype please try putting the transforms setting to your original sourcetpe.&lt;/P&gt;&lt;P&gt;It should be pan:log or pan_log according to your input setting.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[pan:log]
TRANSFORMS-pan_user = pan_src_user&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 14 Feb 2024 06:33:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/677517#M113264</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2024-02-14T06:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: ingest_eval lookup not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/746151#M118586</link>
      <description>&lt;P&gt;[Solution]&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/258946"&gt;@Niro&lt;/a&gt;&amp;nbsp; You can get the desired result by modifying &lt;STRONG&gt;transforms.conf&lt;/STRONG&gt; as follows:&lt;/P&gt;&lt;P&gt;1. /opt/splunk/etc/apps/myapp/local/transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[pan_src_user]
INGEST_EVAL = src_ip=replace(_raw, ".*src_ip=([0-9.]+).*","\1"), src_user_idx=json_extract(lookup("user_ip_mapping.csv",json_object("src_ip", src_ip),json_array(src_user_idx)),"src_user")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ingest-time-lookup-pan-user.jpg" style="width: 578px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/39004iCCAE2074DE1FE7CC/image-size/large?v=v2&amp;amp;px=999" role="button" title="ingest-time-lookup-pan-user.jpg" alt="ingest-time-lookup-pan-user.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 08:52:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ingest-eval-lookup-not-working/m-p/746151#M118586</guid>
      <dc:creator>victor1004k</dc:creator>
      <dc:date>2025-05-26T08:52:38Z</dc:date>
    </item>
  </channel>
</rss>

