<?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: Create a new field while ingesting data using ingest-time eval in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-new-field-while-ingesting-data-using-ingest-time/m-p/636779#M108917</link>
    <description>&lt;P&gt;Yes, that is the right method for using INGEST_EVAL to create a field.&amp;nbsp; An important thing to note is the expression cannot reference any search-time fields (because they don't exist, yet).&lt;/P&gt;&lt;P&gt;What results do you get from that?&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2023 20:47:53 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-03-30T20:47:53Z</dc:date>
    <item>
      <title>How to create a new field while ingesting data using ingest-time eval?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-new-field-while-ingesting-data-using-ingest-time/m-p/636775#M108916</link>
      <description>&lt;P&gt;Hi Splunkers,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to create a new field name called "app_id" and send it along data while ingesting into Splunk.&lt;BR /&gt;I came accross ingest-time eval option can do so.&lt;BR /&gt;&lt;BR /&gt;In my case, I want to have a field like"app_id" with its values extracted using from other fields (bolded in below ) using case condition.&lt;BR /&gt;&lt;BR /&gt;app_id = case(&lt;STRONG&gt;sourcetype&lt;/STRONG&gt;=="aws:ecs:service:acid:stdout", mvindex(split(host,"-"),1), isnotnull('&lt;STRONG&gt;kubernetes.labels.applicationid&lt;/STRONG&gt;'), 'kubernetes.labels.applicationid', isnotnull(applicationid) , &lt;STRONG&gt;applicationid&lt;/STRONG&gt;, isnotnull(&lt;STRONG&gt;aws_account_id&lt;/STRONG&gt;), aws_account_id, 1=1 , "NA")&lt;BR /&gt;&lt;BR /&gt;Is this a right way to add above case conditions in "Ingest_Eval" field in transforms.conf?&lt;/P&gt;
&lt;P&gt;Like,&lt;BR /&gt;INGEST_EVAL= app_id=case(&lt;STRONG&gt;sourcetype&lt;/STRONG&gt;=="aws:ecs:service:acid:stdout", mvindex(split(host,"-"),1), isnotnull('&lt;STRONG&gt;kubernetes.labels.applicationid&lt;/STRONG&gt;'), 'kubernetes.labels.applicationid', isnotnull(applicationid) , &lt;STRONG&gt;applicationid&lt;/STRONG&gt;, isnotnull(&lt;STRONG&gt;aws_account_id&lt;/STRONG&gt;), aws_account_id, 1=1 , "NA")&lt;/P&gt;
&lt;P&gt;Is there any alternate solution on this?&lt;/P&gt;
&lt;P&gt;Please recommend.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Mala S&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 16:15:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-new-field-while-ingesting-data-using-ingest-time/m-p/636775#M108916</guid>
      <dc:creator>mala_splunk_91</dc:creator>
      <dc:date>2023-03-31T16:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new field while ingesting data using ingest-time eval</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-new-field-while-ingesting-data-using-ingest-time/m-p/636779#M108917</link>
      <description>&lt;P&gt;Yes, that is the right method for using INGEST_EVAL to create a field.&amp;nbsp; An important thing to note is the expression cannot reference any search-time fields (because they don't exist, yet).&lt;/P&gt;&lt;P&gt;What results do you get from that?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 20:47:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-new-field-while-ingesting-data-using-ingest-time/m-p/636779#M108917</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-03-30T20:47:53Z</dc:date>
    </item>
  </channel>
</rss>

