<?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 Combine rex field in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Combine-rex-field/m-p/555319#M6097</link>
    <description>&lt;P&gt;how do i combine both these rex field into one and display the count?&lt;/P&gt;&lt;P&gt;index=abc&lt;BR /&gt;"exception":"CommonApplicationException"&lt;BR /&gt;| rex field=_raw "Exception\:\s(?=ABC)(?&amp;lt;ABC_CODE&amp;gt;[^\:]+)\:(?&amp;lt;Message&amp;gt;[^\"]+)"&lt;BR /&gt;| stats count by ABC_CODE, Message&lt;BR /&gt;&lt;BR /&gt;index=abc&lt;BR /&gt;ABC-*&lt;BR /&gt;|rex field=_raw "errors\"\:\[\{\"code\"\:\"(?P&amp;lt;ABC_Code&amp;gt;ABC\-\d+)\"\,\"message\"\:\"(?P&amp;lt;Message&amp;gt;[^\"]+)" | where ABC_Code!="" | search ABC_Code=* | Stats count by ABC_Code, Message&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jun 2021 14:38:11 GMT</pubDate>
    <dc:creator>DougiieDee</dc:creator>
    <dc:date>2021-06-10T14:38:11Z</dc:date>
    <item>
      <title>Combine rex field</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Combine-rex-field/m-p/555319#M6097</link>
      <description>&lt;P&gt;how do i combine both these rex field into one and display the count?&lt;/P&gt;&lt;P&gt;index=abc&lt;BR /&gt;"exception":"CommonApplicationException"&lt;BR /&gt;| rex field=_raw "Exception\:\s(?=ABC)(?&amp;lt;ABC_CODE&amp;gt;[^\:]+)\:(?&amp;lt;Message&amp;gt;[^\"]+)"&lt;BR /&gt;| stats count by ABC_CODE, Message&lt;BR /&gt;&lt;BR /&gt;index=abc&lt;BR /&gt;ABC-*&lt;BR /&gt;|rex field=_raw "errors\"\:\[\{\"code\"\:\"(?P&amp;lt;ABC_Code&amp;gt;ABC\-\d+)\"\,\"message\"\:\"(?P&amp;lt;Message&amp;gt;[^\"]+)" | where ABC_Code!="" | search ABC_Code=* | Stats count by ABC_Code, Message&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 14:38:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Combine-rex-field/m-p/555319#M6097</guid>
      <dc:creator>DougiieDee</dc:creator>
      <dc:date>2021-06-10T14:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Combine rex field</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Combine-rex-field/m-p/555339#M6101</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235178"&gt;@DougiieDee&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc ("exception":"CommonApplicationException" OR ABC-*)
| rex field=_raw "Exception\:\s(?=ABC)(?&amp;lt;ABC_CODE_1&amp;gt;[^\:]+)\:(?&amp;lt;Message_1&amp;gt;[^\"]+)"
|rex field=_raw "errors\"\:\[\{\"code\"\:\"(?P&amp;lt;ABC_CODE_2&amp;gt;ABC\-\d+)\"\,\"message\"\:\"(?P&amp;lt;Message_2&amp;gt;[^\"]+)" 
| eval ABC_CODE=if(isnotnull(ABC_CODE_1),ABC_CODE_1,ABC_CODE_2)
| eval Message=if(isnotnull(Message),Message_1,Message_2)
| where ABC_CODE!=""
| stats count by ABC_CODE, Message&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 16:03:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Combine-rex-field/m-p/555339#M6101</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-10T16:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Combine rex field</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Combine-rex-field/m-p/555368#M6104</link>
      <description>&lt;P&gt;The results are only showing from this&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;|rex field=_raw "errors\"\:\[\{\"code\"\:\"(?P&amp;lt;ABC_CODE_2&amp;gt;ABC\-\d+)\"\,\"message\"\:\"(?P&amp;lt;Message_2&amp;gt;[^\"]+)" &lt;/PRE&gt;&lt;P&gt;other rex field didnt show the results.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 18:52:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Combine-rex-field/m-p/555368#M6104</guid>
      <dc:creator>DougiieDee</dc:creator>
      <dc:date>2021-06-10T18:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Combine rex field</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Combine-rex-field/m-p/555419#M6107</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235178"&gt;@DougiieDee&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please expand timerange if possible?&lt;/P&gt;&lt;P&gt;Meanwhile can you please share sample events from both search?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 04:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Combine-rex-field/m-p/555419#M6107</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-11T04:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Combine rex field</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Combine-rex-field/m-p/555483#M6111</link>
      <description>&lt;P&gt;&lt;SPAN&gt;1. {&lt;SPAN class="t"&gt;\&lt;/SPAN&gt;"&lt;SPAN class="t"&gt;errors\&lt;/SPAN&gt;"&lt;SPAN class="t"&gt;:&lt;/SPAN&gt;[{&lt;SPAN class="t"&gt;\&lt;/SPAN&gt;"&lt;SPAN class="t"&gt;code\&lt;/SPAN&gt;"\&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;SPAN class="t"&gt;&lt;SPAN class="t a"&gt;ABC-&lt;/SPAN&gt;1000\&lt;/SPAN&gt;",&lt;SPAN class="t"&gt;\&lt;/SPAN&gt;"&lt;SPAN class="t"&gt;message\&lt;/SPAN&gt;"\&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;SPAN class="t"&gt;Sorry&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="t"&gt;we&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="t"&gt;are&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="t"&gt;unable&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="t"&gt;to&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="t"&gt;process&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="t"&gt;your&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="t"&gt;request.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=abc&amp;nbsp; ABC-*&lt;BR /&gt;|rex field=_raw "errors\"\:\[\{\"code\"\:\"(?P&amp;lt;ABC_Code&amp;gt;ABC\-\d+)\"\,\"message\"\:\"(?P&amp;lt;Message&amp;gt;[^\"]+)" | where ABC_Code!="" | search ABC_Code=* | Stats count by ABC_Code Message&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;&lt;SPAN class="t a"&gt;&lt;SPAN&gt;2. exception:&lt;/SPAN&gt;CommonApplicationException&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;ABC_1001&lt;SPAN class="t a"&gt;:&lt;/SPAN&gt;We&lt;SPAN&gt;'&lt;/SPAN&gt;re sorry&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;it looks like an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t h"&gt;error&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;occured&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;&lt;SPAN&gt;index=abc "exception":"CommonApplicationException"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| rex field=_raw "Exception\:\s(?=ABC)(?&amp;lt;ABC_CODE&amp;gt;[^\:]+)\:(?&amp;lt;Message&amp;gt;[^\"]+)"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval Message=substr(Message, 1, 140)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| stats count by ABC_CODE, Message&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;&lt;SPAN&gt;I have these two rex and want to combine both but because these two are different is it possible to combine them and have&amp;nbsp;Stats count by ABC_Code Message?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 14:43:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Combine-rex-field/m-p/555483#M6111</guid>
      <dc:creator>DougiieDee</dc:creator>
      <dc:date>2021-06-11T14:43:39Z</dc:date>
    </item>
  </channel>
</rss>

