<?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: How do I edit my chart count search returning HTTP codes to filter out codes 200 and 301 from the list of results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-chart-count-search-returning-HTTP-codes-to/m-p/188464#M54303</link>
    <description>&lt;P&gt;Thre is more than one way as in Perl &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/export/home/gpiadmin/logs/access_log" NOT (" 200 Bytes" OR" 301 Bytes" OR" 302 Bytes")|...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/export/home/gpiadmin/logs/access_log" NOT " 200 Bytes" NOT " 301 Bytes" NOT " 302 Bytes"|...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or even&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/export/home/logs/access_log" | rex ".*?HTTP\/\d+\.\d+\" (?&amp;lt;status_code&amp;gt;\d+)"|chart count by status_code | search NOT( status_code=200 ORstaus_code=301)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 28 Aug 2015 14:01:51 GMT</pubDate>
    <dc:creator>FritzWittwer_ol</dc:creator>
    <dc:date>2015-08-28T14:01:51Z</dc:date>
    <item>
      <title>How do I edit my chart count search returning HTTP codes to filter out codes 200 and 301 from the list of results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-chart-count-search-returning-HTTP-codes-to/m-p/188462#M54301</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/export/home/logs/access_log" | rex ".*?HTTP\/\d+\.\d+\" (?&amp;lt;status_code&amp;gt;\d+)"|chart count by status_code
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is giving me the all the HTTP codes and the corresponding counts as below&lt;/P&gt;

&lt;H2&gt;Code Count&lt;/H2&gt;

&lt;P&gt;200 5000&lt;BR /&gt;
404 1,321&lt;BR /&gt;
500 8,888&lt;BR /&gt;
301 9,102&lt;/P&gt;

&lt;P&gt;I don't want the 200 and 301 codes in my result set. For this, I tried the below logic, but never worked. It still lists the 200 and 301.&lt;/P&gt;

&lt;P&gt;I need something like:&lt;/P&gt;

&lt;H2&gt;Code Count&lt;/H2&gt;

&lt;P&gt;404 1,321&lt;BR /&gt;
500 8,888&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/export/home/gpiadmin/logs/access_log" NOT (" 200 Bytes" AND " 301 Bytes" AND " 302 Bytes")|rex ".*?HTTP\/\d+\.\d+\" (?&amp;lt;status_code&amp;gt;\d+)"|chart count by status_code
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Data String I am searching against:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Time Taken: 120039666 URL_STRING: /shop/dept_outfit.jsp 11.111.111.11 - - [28/Aug/2015:02:54:20 -0700] "GET /shop/dept_outfit.jsp HTTP/1.0" 200 Bytes: 56814 "-" "Mozilla/5.0 (compatible; test/1.0; &lt;A href="http://open.test.com/dev/test)&amp;quot;" target="test_blank"&gt;http://open.test.com/dev/test)"&lt;/A&gt;;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please advise.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2015 12:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-chart-count-search-returning-HTTP-codes-to/m-p/188462#M54301</guid>
      <dc:creator>mcvr</dc:creator>
      <dc:date>2015-08-28T12:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my chart count search returning HTTP codes to filter out codes 200 and 301 from the list of results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-chart-count-search-returning-HTTP-codes-to/m-p/188463#M54302</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/export/home/gpiadmin/logs/access_log" NOT (" 200 Bytes" OR " 301 Bytes" OR " 302 Bytes")|rex ".*?HTTP\/\d+\.\d+\" (?&amp;lt;status_code&amp;gt;\d+)"|chart count by status_code
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Aug 2015 13:51:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-chart-count-search-returning-HTTP-codes-to/m-p/188463#M54302</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-08-28T13:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my chart count search returning HTTP codes to filter out codes 200 and 301 from the list of results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-chart-count-search-returning-HTTP-codes-to/m-p/188464#M54303</link>
      <description>&lt;P&gt;Thre is more than one way as in Perl &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/export/home/gpiadmin/logs/access_log" NOT (" 200 Bytes" OR" 301 Bytes" OR" 302 Bytes")|...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/export/home/gpiadmin/logs/access_log" NOT " 200 Bytes" NOT " 301 Bytes" NOT " 302 Bytes"|...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or even&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/export/home/logs/access_log" | rex ".*?HTTP\/\d+\.\d+\" (?&amp;lt;status_code&amp;gt;\d+)"|chart count by status_code | search NOT( status_code=200 ORstaus_code=301)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Aug 2015 14:01:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-chart-count-search-returning-HTTP-codes-to/m-p/188464#M54303</guid>
      <dc:creator>FritzWittwer_ol</dc:creator>
      <dc:date>2015-08-28T14:01:51Z</dc:date>
    </item>
  </channel>
</rss>

