<?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: exclude certain event type from count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512769#M143834</link>
    <description>&lt;P&gt;if you looked at my answer, it contains 4 rows like below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thambisetty_1-1596724312405.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10084iCD981DCD2DBEBD6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thambisetty_1-1596724312405.png" alt="thambisetty_1-1596724312405.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Look at eventtype field All_logs is present in all rows but if you see final output the count of All_logs below is 1 because All_logs is present in one row alone with out any other value.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thambisetty_0-1596724261671.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10083i7CDC9D91F28AF0D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thambisetty_0-1596724261671.png" alt="thambisetty_0-1596724261671.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Aug 2020 14:33:06 GMT</pubDate>
    <dc:creator>thambisetty</dc:creator>
    <dc:date>2020-08-06T14:33:06Z</dc:date>
    <item>
      <title>exclude certain event type from count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512677#M143799</link>
      <description>&lt;P&gt;Hi, I have a stat on eventtype like this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;index=xyz | stats count by eventtype&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This query generates:&lt;BR /&gt;&lt;BR /&gt;All_logs&amp;nbsp; = 14&lt;/P&gt;&lt;P&gt;Error = 2&lt;/P&gt;&lt;P&gt;Login = 4&lt;/P&gt;&lt;P&gt;Auth = 8&lt;/P&gt;&lt;P&gt;Where All_logs is also an eventtype which encomapsses all events: Error, Login and Auth&lt;/P&gt;&lt;P&gt;How can I rewrite this query so I will see count of eventtype excluding All_logs and Login events&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 05:04:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512677#M143799</guid>
      <dc:creator>noman377</dc:creator>
      <dc:date>2020-08-06T05:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: exclude certain event type from count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512681#M143802</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224643"&gt;@noman377&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used many dummy fields to make you understand&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="eventtype,
All_logs,
Error|All_logs,
Login|All_logs,
Auth|All_logs"
| multikv forceheader=1 `comment("prepares sample dataset")`
| makemv eventtype delim="|" 
| eval eventtype_dup=eventtype
| mvcombine eventtype_dup delim=","
| rex field=eventtype_dup mode=sed "s/All_logs//g"
| fillnull eventtype_dup 
| eval eventtype_dup2=if(eventtype_dup=="",eventtype,eventtype_dup)
| stats count by eventtype_dup2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;up vote if it solves your issue.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 06:36:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512681#M143802</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-06T06:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: exclude certain event type from count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512762#M143832</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129407"&gt;@thambisetty&lt;/a&gt;&amp;nbsp;, still seeing All_logs and Login events in the stats count &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 14:22:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512762#M143832</guid>
      <dc:creator>noman377</dc:creator>
      <dc:date>2020-08-06T14:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: exclude certain event type from count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512769#M143834</link>
      <description>&lt;P&gt;if you looked at my answer, it contains 4 rows like below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thambisetty_1-1596724312405.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10084iCD981DCD2DBEBD6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thambisetty_1-1596724312405.png" alt="thambisetty_1-1596724312405.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Look at eventtype field All_logs is present in all rows but if you see final output the count of All_logs below is 1 because All_logs is present in one row alone with out any other value.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thambisetty_0-1596724261671.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10083i7CDC9D91F28AF0D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thambisetty_0-1596724261671.png" alt="thambisetty_0-1596724261671.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 14:33:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512769#M143834</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-06T14:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: exclude certain event type from count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512785#M143835</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129407"&gt;@thambisetty&lt;/a&gt;&amp;nbsp;, I am sorry, my post probably was not very clear. Let me rephrase...&lt;BR /&gt;Original query:&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;&lt;I&gt;index=xyz | stats count by eventtype&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;where All_logs encompasses every log in the search (100% coverage).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Current Result:&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;eventtype&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;count&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;All_logs&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;14&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;Error&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;Login&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;Auth&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;8&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;Expected Result:&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;eventtype&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;count&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;Error&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="p1"&gt;Auth&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P class="p1"&gt;8&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;I&gt;&amp;nbsp;&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Appreciate all your help.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 15:15:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512785#M143835</guid>
      <dc:creator>noman377</dc:creator>
      <dc:date>2020-08-06T15:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: exclude certain event type from count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512789#M143838</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;index=xyz | stats count by eventtype | search eventtype IN (“Error”,”Auth”)&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 15:35:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/exclude-certain-event-type-from-count/m-p/512789#M143838</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-06T15:35:29Z</dc:date>
    </item>
  </channel>
</rss>

