<?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: Pull in client/server errors into table format in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595427#M207229</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt;&amp;nbsp;I have tired that it does not categorizes the errors. I'd like to see the pie chart breakdown by error code. For example 401 - 2%, 404 - 18%, 443 - 23% and etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Apr 2022 14:10:45 GMT</pubDate>
    <dc:creator>Khanu89</dc:creator>
    <dc:date>2022-04-26T14:10:45Z</dc:date>
    <item>
      <title>How to pull in client/server errors into table format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595085#M207084</link>
      <description>&lt;P&gt;Hello - thank you for assisting in advance. I need to write up a query which will pull in client/server errors from event message into table format as shown below.&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="33px"&gt;_time&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="33px"&gt;status_category&lt;/TD&gt;
&lt;TD width="16.666666666666668%" height="33px"&gt;Error Code&lt;/TD&gt;
&lt;TD width="16.666666666666668%" height="33px"&gt;error_count&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="33px"&gt;2022-01-26:17:30:00&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="33px"&gt;server error&lt;/TD&gt;
&lt;TD width="16.666666666666668%" height="33px"&gt;503&lt;/TD&gt;
&lt;TD width="16.666666666666668%" height="33px"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%" height="33px"&gt;2022-01-26:18:30:00&lt;/TD&gt;
&lt;TD width="33.333333333333336%" height="33px"&gt;client error&lt;/TD&gt;
&lt;TD width="16.666666666666668%" height="33px"&gt;404&lt;/TD&gt;
&lt;TD width="16.666666666666668%" height="33px"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are&amp;nbsp; examples of the EvenTypes and available fields for the index.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error 443.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19281i230C9FDBE1DF52AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Error 443.png" alt="Error 443.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Error 503" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19280i58F2BDD7CD8A26BF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Error 503.png" alt="Error 503" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Error 503&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Fields" style="width: 186px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19279i17251A1A83EB91D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fields.png" alt="Fields" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Fields&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 15:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595085#M207084</guid>
      <dc:creator>Khanu89</dc:creator>
      <dc:date>2022-04-25T15:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Pull in client/server errors into table format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595096#M207089</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244949"&gt;@Khanu89&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Your logs seem not to be formatted properly in order to extract the error code. As if you look at the two examples that you gave here there is no common format as such we can write a regex to extract those values.&lt;UL&gt;&lt;LI&gt;Let me know if any additional information you have on this.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Though, I'm giving you a query that should be able to help you once you find out a way to extract the ErrorCode field.&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your search query&amp;gt;
| stats count as error_count, max(_time) as _time by ErrorCode
| eval status_category=case(ErrorCode&amp;gt;=400 AND ErrorCode&amp;lt;500, "client error", ErrorCode&amp;gt;=500, "server error", 1==1, "-")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 05:31:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595096#M207089</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-04-25T05:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pull in client/server errors into table format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595308#M207178</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt;&amp;nbsp;I figured out my rex query and was able to use yours to get my table but not all rows are populating. here is what I go so far.&lt;/P&gt;&lt;P&gt;Query:&lt;/P&gt;&lt;P&gt;index=epic_ehr sourcetype="WinEventLog:Epic"&lt;BR /&gt;|rex field=_raw "%\s(?P&amp;lt;ErrorCode&amp;gt;.*)\s"&lt;BR /&gt;| stats count as error_count, max(_time) as _time by ErrorCode&lt;BR /&gt;| eval status_category=case(ErrorCode&amp;gt;=400 AND ErrorCode&amp;lt;500, "client error", ErrorCode&amp;gt;=500, "server error", 1==1, "-")&lt;BR /&gt;|table _time,ErrorCode,Status_Category,Error_Count&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screen Shot 2022-04-25 at 6.44.07 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19315iE4E4D65723FD2842/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-04-25 at 6.44.07 PM.png" alt="Screen Shot 2022-04-25 at 6.44.07 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can convert this data into a Pie chart which shows percentage of each error code?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 23:47:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595308#M207178</guid>
      <dc:creator>Khanu89</dc:creator>
      <dc:date>2022-04-25T23:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Pull in client/server errors into table format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595325#M207191</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244949"&gt;@Khanu89&lt;/a&gt;&amp;nbsp;- For pie chart that shows count by ErrorCode.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=epic_ehr sourcetype="WinEventLog:Epic"
|rex field=_raw "%\s(?P&amp;lt;ErrorCode&amp;gt;.*)\s"
| stats count by ErrorCode&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 05:36:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595325#M207191</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-04-26T05:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pull in client/server errors into table format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595427#M207229</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt;&amp;nbsp;I have tired that it does not categorizes the errors. I'd like to see the pie chart breakdown by error code. For example 401 - 2%, 404 - 18%, 443 - 23% and etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 14:10:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595427#M207229</guid>
      <dc:creator>Khanu89</dc:creator>
      <dc:date>2022-04-26T14:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Pull in client/server errors into table format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595428#M207230</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/244949"&gt;@Khanu89&lt;/a&gt;&amp;nbsp;- I thought that should work (reference - &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.6/Viz/PieChart" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.6/Viz/PieChart&lt;/A&gt;), but please also try:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=epic_ehr sourcetype="WinEventLog:Epic"
|rex field=_raw "%\s(?P&amp;lt;ErrorCode&amp;gt;.*)\s"
| chart count by ErrorCode&lt;/LI-CODE&gt;&lt;P&gt;OR&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=epic_ehr sourcetype="WinEventLog:Epic"
|rex field=_raw "%\s(?P&amp;lt;ErrorCode&amp;gt;.*)\s"
| chart count over ErrorCode&lt;/LI-CODE&gt;&lt;P&gt;And change the Visualization to Pie Chart and it should show what you want I think.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For % (percentage),&lt;/STRONG&gt; you need to use the following&amp;nbsp;option in the XML part of the pie chart to show percentage values.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;option name="charting.chart.showPercent"&amp;gt;true&amp;lt;/option&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 14:19:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595428#M207230</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-04-26T14:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pull in client/server errors into table format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595455#M207236</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt;&amp;nbsp;I have also tried what you've suggested and it gives me the following pie chart which isn't what I want.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-04-26 at 9.56.17 AM.png" style="width: 1091px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19336i7BFFBD1CCB67C4EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-04-26 at 9.56.17 AM.png" alt="Screen Shot 2022-04-26 at 9.56.17 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like the pie chart to be like the one below&amp;nbsp; but group all 400's, 500's, Other instead of listing individually as they are listed in the screenshot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-04-26 at 9.55.07 AM.png" style="width: 1623px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19337iC4DCB70D4ED8ED60/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-04-26 at 9.55.07 AM.png" alt="Screen Shot 2022-04-26 at 9.55.07 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I &lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 16:24:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595455#M207236</guid>
      <dc:creator>Khanu89</dc:creator>
      <dc:date>2022-04-26T16:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pull in client/server errors into table format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595461#M207237</link>
      <description>&lt;P&gt;It's not working as you expect because the &lt;STRONG&gt;ErrorCode&lt;/STRONG&gt; field is not being extracted correctly.&lt;/P&gt;&lt;P&gt;Regex seems very generic. It would match anything that starts with % (percentage sign) and comes between two spaces (\s).&lt;/P&gt;&lt;P&gt;A somewhat better regex would be (still not 100% accurate as logs are not as formated):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=_raw "%\s(?P&amp;lt;ErrorCode&amp;gt;\d+)\s"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 17:06:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-pull-in-client-server-errors-into-table-format/m-p/595461#M207237</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-04-26T17:06:40Z</dc:date>
    </item>
  </channel>
</rss>

