<?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: Stats showing count of 1 result vs NOT that result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184958#M53270</link>
    <description>&lt;P&gt;Try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    ... | eval type=if(match(useragent, ".*bot.*"), "BOT", "NOT")|stats count by type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 15 Jan 2015 22:16:16 GMT</pubDate>
    <dc:creator>_d_</dc:creator>
    <dc:date>2015-01-15T22:16:16Z</dc:date>
    <item>
      <title>Stats showing count of 1 result vs NOT that result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184956#M53268</link>
      <description>&lt;P&gt;I am super new to using the powerful eval command but cannot quite get my head around the syntax. Can someone help me?&lt;/P&gt;

&lt;P&gt;I am trying to show stats to show how many useragents have the word bot somewhere in the field vs those that do not.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval type=BOT if(useragent="*bot*")|eval type=NOT if(useragent!="*bot*")|stats count by type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Jan 2015 22:01:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184956#M53268</guid>
      <dc:creator>KindaWorking</dc:creator>
      <dc:date>2015-01-15T22:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Stats showing count of 1 result vs NOT that result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184957#M53269</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | eval type=if(like(useragent,"%bot%"),"BOT","NOT") | stats count by type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Jan 2015 22:15:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184957#M53269</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-01-15T22:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Stats showing count of 1 result vs NOT that result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184958#M53270</link>
      <description>&lt;P&gt;Try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    ... | eval type=if(match(useragent, ".*bot.*"), "BOT", "NOT")|stats count by type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Jan 2015 22:16:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184958#M53270</guid>
      <dc:creator>_d_</dc:creator>
      <dc:date>2015-01-15T22:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Stats showing count of 1 result vs NOT that result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184959#M53271</link>
      <description>&lt;P&gt;Thanks both &lt;EM&gt;d&lt;/EM&gt; and somesoni2, you were both correct. Thanks!&lt;BR /&gt;
(I cannot add comments to your answers)&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jan 2015 22:41:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184959#M53271</guid>
      <dc:creator>KindaWorking</dc:creator>
      <dc:date>2015-01-15T22:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Stats showing count of 1 result vs NOT that result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184960#M53272</link>
      <description>&lt;P&gt;Hi @KindaWorking&lt;/P&gt;

&lt;P&gt;Glad you got two awesome answers! Question though for you. What happened exactly when you tried to comment on their answers? Did you receive an error or did a message pop up saying something about not having enough karma or permissions? This might be a bug we thought was fixed already.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jan 2015 01:09:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184960#M53272</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-01-16T01:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Stats showing count of 1 result vs NOT that result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184961#M53273</link>
      <description>&lt;P&gt;Hi ppablo, it said that I did not have enough karma.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jan 2015 02:06:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184961#M53273</guid>
      <dc:creator>KindaWorking</dc:creator>
      <dc:date>2015-01-16T02:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Stats showing count of 1 result vs NOT that result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184962#M53274</link>
      <description>&lt;P&gt;Thanks for confirming. It should be fixed now, but if you're still unable to comment on other users' answers/comments, just let me know.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 02:05:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-showing-count-of-1-result-vs-NOT-that-result/m-p/184962#M53274</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-01-21T02:05:09Z</dc:date>
    </item>
  </channel>
</rss>

