<?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 Create Props Stanzas Based on Field Value in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Create-Props-Stanzas-Based-on-Field-Value/m-p/667413#M9799</link>
    <description>&lt;P&gt;I have events that return different structured fields depending on the value of a field called TYPE.&amp;nbsp; This all comes from the same sourcetype.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;if type=TYPE1, I might have fields called: TYPE1.exe, TYPE1.comm, TYPE1.path, TYPE1.filename&lt;/P&gt;&lt;P&gt;if type=TYPE2, I might have fields called: TYPE2.comm, TYPE2.path, TYPE2.host&lt;/P&gt;&lt;P&gt;As you can see, each type brings a different set of base fields.&amp;nbsp; We are using data model searches so I want to get these base fields into CIM compliance.&amp;nbsp;&amp;nbsp; Is there a way to create stanzas in props.conf or transforms.conf that will allow me to field alias these values based on the type value?&amp;nbsp; I tried straight-out field aliasing in props.conf only to find I was actually overwriting values due to precedence/order of my field alias commands.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;</description>
    <pubDate>Sun, 05 Nov 2023 14:26:15 GMT</pubDate>
    <dc:creator>tom_porter</dc:creator>
    <dc:date>2023-11-05T14:26:15Z</dc:date>
    <item>
      <title>Create Props Stanzas Based on Field Value</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Create-Props-Stanzas-Based-on-Field-Value/m-p/667413#M9799</link>
      <description>&lt;P&gt;I have events that return different structured fields depending on the value of a field called TYPE.&amp;nbsp; This all comes from the same sourcetype.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;if type=TYPE1, I might have fields called: TYPE1.exe, TYPE1.comm, TYPE1.path, TYPE1.filename&lt;/P&gt;&lt;P&gt;if type=TYPE2, I might have fields called: TYPE2.comm, TYPE2.path, TYPE2.host&lt;/P&gt;&lt;P&gt;As you can see, each type brings a different set of base fields.&amp;nbsp; We are using data model searches so I want to get these base fields into CIM compliance.&amp;nbsp;&amp;nbsp; Is there a way to create stanzas in props.conf or transforms.conf that will allow me to field alias these values based on the type value?&amp;nbsp; I tried straight-out field aliasing in props.conf only to find I was actually overwriting values due to precedence/order of my field alias commands.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2023 14:26:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Create-Props-Stanzas-Based-on-Field-Value/m-p/667413#M9799</guid>
      <dc:creator>tom_porter</dc:creator>
      <dc:date>2023-11-05T14:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create Props Stanzas Based on Field Value</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Create-Props-Stanzas-Based-on-Field-Value/m-p/667449#M9800</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259005"&gt;@tom_porter&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;using CIM you have two solutions:&lt;/P&gt;&lt;P&gt;you could add all the fields to the CIM data Model (I don't like),&lt;/P&gt;&lt;P&gt;you could try to normalize your data adding few fields and using calculated fields to insert the correct values.&lt;/P&gt;&lt;P&gt;For example you could add some field to the CIM data Model (exe, comm, path, filename&amp;nbsp;hostname) and then create some calculated fields:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval 
   exe=if(type=TYPE1, TYPE1.exe, TYPE2.exe),
   comm=if(type=TYPE1, TYPE1.comm, TYPE2.comm)&lt;/LI-CODE&gt;&lt;P&gt;then you can use thee fields in your searches using Data Model values.&lt;/P&gt;&lt;P&gt;For more infos about normalization see:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.splunk.com/en_us/blog/learn/data-normalization.html?locale=en_us" target="_blank"&gt;https://www.splunk.com/en_us/blog/learn/data-normalization.html?locale=en_us&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/CIM/5.2.0/User/UsetheCIMtonormalizedataatsearchtime" target="_blank"&gt;https://docs.splunk.com/Documentation/CIM/5.2.0/User/UsetheCIMtonormalizedataatsearchtime&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 06:29:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Create-Props-Stanzas-Based-on-Field-Value/m-p/667449#M9800</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-11-06T06:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create Props Stanzas Based on Field Value</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Create-Props-Stanzas-Based-on-Field-Value/m-p/667514#M9803</link>
      <description>&lt;P&gt;Thank you...will try it out this week.&amp;nbsp; We actually have 40 unique type values (ouch), so this may take a while.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 12:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Create-Props-Stanzas-Based-on-Field-Value/m-p/667514#M9803</guid>
      <dc:creator>tom_porter</dc:creator>
      <dc:date>2023-11-06T12:49:19Z</dc:date>
    </item>
  </channel>
</rss>

