<?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 In search - Dynamic REX loading. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/In-search-Dynamic-REX-loading/m-p/523901#M147808</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I´m trying to load custom rex field extraction if another field has a certain value, for example:&lt;BR /&gt;&lt;BR /&gt;if logtype=system&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;then&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;search | rex field=_raw .....&lt;/P&gt;&lt;P&gt;if logtype= application&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; then&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;search | rex field=_raw ....&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;logtype&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;username&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;_raw&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;system&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;user=002&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;application&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;suser=004&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 09 Oct 2020 12:28:35 GMT</pubDate>
    <dc:creator>cpm003</dc:creator>
    <dc:date>2020-10-09T12:28:35Z</dc:date>
    <item>
      <title>In search - Dynamic REX loading.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-search-Dynamic-REX-loading/m-p/523901#M147808</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I´m trying to load custom rex field extraction if another field has a certain value, for example:&lt;BR /&gt;&lt;BR /&gt;if logtype=system&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;then&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;search | rex field=_raw .....&lt;/P&gt;&lt;P&gt;if logtype= application&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; then&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;search | rex field=_raw ....&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;logtype&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;username&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;_raw&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;system&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;user=002&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;application&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;suser=004&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 12:28:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-search-Dynamic-REX-loading/m-p/523901#M147808</guid>
      <dc:creator>cpm003</dc:creator>
      <dc:date>2020-10-09T12:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: In search - Dynamic REX loading.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-search-Dynamic-REX-loading/m-p/523912#M147814</link>
      <description>&lt;P&gt;If the rex doesn't match then the field isn't extracted so why can't you just both rex and let one pick up user= and the other pick up suser=?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 12:59:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-search-Dynamic-REX-loading/m-p/523912#M147814</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-09T12:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: In search - Dynamic REX loading.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/In-search-Dynamic-REX-loading/m-p/523913#M147815</link>
      <description>&lt;P&gt;Try something like this run-anywhere example.&amp;nbsp; I'll leave to you get the logtype field into the subsearch.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="This event contains user=002 so it should match system logtypes" 
| regex _raw=[|makeresults | eval logtype="system" | eval match=case(logtype="application","user=002", logtype="system","suser=004", 1==1, "XXnoMatchXX") | return $match]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 13:01:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/In-search-Dynamic-REX-loading/m-p/523913#M147815</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-10-09T13:01:33Z</dc:date>
    </item>
  </channel>
</rss>

