<?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: Need to extract error codes coming within single event in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592229#M206139</link>
    <description>&lt;P&gt;No all reason codes coming in single event .That’s where I have difficulty in gathering stats.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Apr 2022 14:58:45 GMT</pubDate>
    <dc:creator>pradeepkm</dc:creator>
    <dc:date>2022-04-04T14:58:45Z</dc:date>
    <item>
      <title>How to extract error codes coming within single event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592117#M206118</link>
      <description>&lt;P&gt;I have an event which contains error reason &amp;nbsp;codes of failed records . I have to extract these reason codes and get a count of each of these reason codes.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 16:35:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592117#M206118</guid>
      <dc:creator>pradeepkm</dc:creator>
      <dc:date>2022-04-04T16:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract error codes coming within single event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592133#M206122</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243887"&gt;@pradeepkm&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;to extract these error codes you have to create a field using a regex and than use a stats command to aggregate them.&lt;/P&gt;&lt;P&gt;Only as an example, if you want to take the oracle errors that are always "ORAXXXX" where XXXX is a four digit number, you should use a search like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index
| rex "?(&amp;lt;ora_error&amp;gt;ORA\d+)"
| stats count BY ora_error&lt;/LI-CODE&gt;&lt;P&gt;To better help you I'd need a sample of your logs.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 06:45:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592133#M206122</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-04T06:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract error codes coming within single event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592220#M206136</link>
      <description>&lt;P&gt;This is how my event looks like&amp;nbsp;&lt;/P&gt;&lt;P&gt;Processing started….&lt;/P&gt;&lt;P&gt;Record No 1&lt;BR /&gt;Reason code : :Component code not found&amp;nbsp;&lt;/P&gt;&lt;P&gt;Record No.3&lt;/P&gt;&lt;P&gt;Reason code: :Address not found&amp;nbsp;&lt;/P&gt;&lt;P&gt;Record No.7&lt;/P&gt;&lt;P&gt;Reason code::Address not found&amp;nbsp;&lt;/P&gt;&lt;P&gt;processing ended at…&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 13:31:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592220#M206136</guid>
      <dc:creator>pradeepkm</dc:creator>
      <dc:date>2022-04-04T13:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract error codes coming within single event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592228#M206138</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243887"&gt;@pradeepkm&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is this a multline event&amp;nbsp; ???&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;your search | rex field=_raw "Reason code::(?&amp;lt;Reason_code&amp;gt;[\w+ ]+)" |stats count by Reason_code&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 14:43:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592228#M206138</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2022-04-04T14:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract error codes coming within single event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592229#M206139</link>
      <description>&lt;P&gt;No all reason codes coming in single event .That’s where I have difficulty in gathering stats.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 14:58:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592229#M206139</guid>
      <dc:creator>pradeepkm</dc:creator>
      <dc:date>2022-04-04T14:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need to extract error codes coming within single event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592398#M206196</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/243887"&gt;@pradeepkm&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just try the below search&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;index="response" sourcetype="new" | rex field=_raw "Reason code::(?&amp;lt;Reason_code&amp;gt;[\w+ ]+)" max_match=0 |stats count by Reason_code&lt;/P&gt;&lt;P&gt;i just ingested your data and ran the above search query jusr replace your search before the rex command&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="venky1544_0-1649157083707.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18936i4F8CD0EBEDFF7476/image-size/medium?v=v2&amp;amp;px=400" role="button" title="venky1544_0-1649157083707.png" alt="venky1544_0-1649157083707.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="venky1544_1-1649157132995.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/18937i0428CD0ADB06C82F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="venky1544_1-1649157132995.png" alt="venky1544_1-1649157132995.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;if this helps karma points are appreciated&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 11:13:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-error-codes-coming-within-single-event/m-p/592398#M206196</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2022-04-05T11:13:40Z</dc:date>
    </item>
  </channel>
</rss>

