<?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: Splunk query for formatting the output in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385517#M112585</link>
    <description>&lt;P&gt;&lt;CODE&gt;| where '500' &amp;gt; 10&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Jun 2018 06:57:05 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2018-06-23T06:57:05Z</dc:date>
    <item>
      <title>Splunk query for formatting the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385512#M112580</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;i am new to splunk and SPL. Below are the sample logs and my query. i was trying to get output like shown below picture where i need a table that contains host 404 500 503 codes but i couldn't able to figure it out. Any help would be appreciated.&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5203iE2468AFFD5E73C85/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;index=* sourcetype=&lt;EM&gt;web&lt;/EM&gt; host=ls8lw* source=&lt;EM&gt;access&lt;/EM&gt; |rex field=source "/var/log/apache/(?.*).api.com-access" |rex "HTTP/1.(1|0)\" (?\d+)" | search status &amp;gt; 404&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;12.332.11.189 - - - [15/Jun/2017:19:07:35 -0400] "GET&lt;BR /&gt;
/connections/oracle/integration/user/experienceapproval/v1/learningapprovals&lt;BR /&gt;
HTTP/1.1" 500 273 "-" "Java/1.2.0_161"&lt;BR /&gt;
"-" "-" 91&lt;/P&gt;

&lt;P&gt;12.13.123.134 159.112.160.51 - - [15/Jun/2017:18:14:44 -0400] "GET&lt;BR /&gt;
/unicorn.ico HTTP/1.1" 404 800 "-"&lt;BR /&gt;
"Mozilla/5.0 (Windows NT 6.1; WMOM64;&lt;BR /&gt;
carpet/7.0; rv:11.0) like pecko" "-"&lt;BR /&gt;
"-" 1&lt;/P&gt;

&lt;P&gt;125.5.125.35 48.58.788.129 - - [15/Jun/2017:17:50:05 -0400] "GET&lt;BR /&gt;
/connections/oracle/public/user/searching/v1/Items?$filter=maxlength/itemID%20eq%20'pqwe'%20and%20searching/select=items,itemTypePD,revisionDate&lt;BR /&gt;
HTTP/1.1" 503 77 "-"&lt;BR /&gt;
"Apache-HttpClient/3.4 (Java 1.2&lt;BR /&gt;
minimum; Java/1.9.0_131)" "-" "-" 198&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 15 Jun 2018 22:39:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385512#M112580</guid>
      <dc:creator>iamlearner123</dc:creator>
      <dc:date>2018-06-15T22:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query for formatting the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385513#M112581</link>
      <description>&lt;P&gt;To draw a two-dimensional chart of counts like that, append &lt;CODE&gt;... | chart count by host status&lt;/CODE&gt; to your search. [Side note, I keep forgetting which axis is which - you might need to swap around host and status.]&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 23:12:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385513#M112581</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2018-06-15T23:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query for formatting the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385514#M112582</link>
      <description>&lt;P&gt;Hi iamlearner123,&lt;BR /&gt;
see the chart command (see &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.1/SearchReference/Chart"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.1/SearchReference/Chart&lt;/A&gt; )&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index= sourcetype=web host=ls8lw source=access 
|rex field=source "yout_regex1" 
|rex "your_regex2" 
| where status &amp;gt; 404
| chart count over status BY host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sorry for the regexes but aren't readable, use Code Sample button (101010) to show code.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jun 2018 08:06:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385514#M112582</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-06-16T08:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query for formatting the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385515#M112583</link>
      <description>&lt;P&gt;Thank you for the reply ,, can i please know how to display the results only if number of errors are greater than 10. For example , if number of "500" errors count is greater than 100, then only it should display the results.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 22:09:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385515#M112583</guid>
      <dc:creator>iamlearner123</dc:creator>
      <dc:date>2018-06-22T22:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query for formatting the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385516#M112584</link>
      <description>&lt;P&gt;Thank you for the reply ,, can i please know how to display the results only if number of errors are greater than 10. For example , if number of "500" errors count is greater than 100, then only it should display the results.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 22:09:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385516#M112584</guid>
      <dc:creator>iamlearner123</dc:creator>
      <dc:date>2018-06-22T22:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query for formatting the output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385517#M112585</link>
      <description>&lt;P&gt;&lt;CODE&gt;| where '500' &amp;gt; 10&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jun 2018 06:57:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-for-formatting-the-output/m-p/385517#M112585</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2018-06-23T06:57:05Z</dc:date>
    </item>
  </channel>
</rss>

