<?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 Using the Splunk Tutorial data, how to find the number of hits and top 20 category and top 20 domain? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-the-Splunk-Tutorial-data-how-to-find-the-number-of-hits/m-p/368774#M108703</link>
    <description>&lt;P&gt;How to find the number of hits and top 20 category and top 20 domain using the tutorial data on Splunk. Please help, I am new to Splunk. I also want to know the "status code count" of it so please help me fast.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2017 16:07:53 GMT</pubDate>
    <dc:creator>rishabh4</dc:creator>
    <dc:date>2017-03-21T16:07:53Z</dc:date>
    <item>
      <title>Using the Splunk Tutorial data, how to find the number of hits and top 20 category and top 20 domain?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-the-Splunk-Tutorial-data-how-to-find-the-number-of-hits/m-p/368774#M108703</link>
      <description>&lt;P&gt;How to find the number of hits and top 20 category and top 20 domain using the tutorial data on Splunk. Please help, I am new to Splunk. I also want to know the "status code count" of it so please help me fast.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 16:07:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-the-Splunk-Tutorial-data-how-to-find-the-number-of-hits/m-p/368774#M108703</guid>
      <dc:creator>rishabh4</dc:creator>
      <dc:date>2017-03-21T16:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Splunk Tutorial data, how to find the number of hits and top 20 category and top 20 domain?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-the-Splunk-Tutorial-data-how-to-find-the-number-of-hits/m-p/368775#M108704</link>
      <description>&lt;P&gt;Try this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=INDEX_NAME | top limit=20 referer_domain categoryId&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 16:44:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-the-Splunk-Tutorial-data-how-to-find-the-number-of-hits/m-p/368775#M108704</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-03-21T16:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Splunk Tutorial data, how to find the number of hits and top 20 category and top 20 domain?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-the-Splunk-Tutorial-data-how-to-find-the-number-of-hits/m-p/368776#M108705</link>
      <description>&lt;P&gt;@rishabh4. You have mentioned three cases. To begin with you need three commands&lt;/P&gt;

&lt;P&gt;Top 20 domain (Do not show percent, show count)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt; referer=*
| top 20 referer_domain showperc=f showcount=t
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Top 20 category (Do not show percent, show count)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt; categoryId=*
| top 20 categoryId showperc=f showcount=t
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: There might not be 20 Categories in tutorial data&lt;BR /&gt;
Status code count&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt; status=*
| stats count as Count by status
| sort - Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For details on any SPL command you should refer to &lt;STRONG&gt;docs.splunk.com&lt;/STRONG&gt;. When you load the data ensure that you check what index data is loaded and what is the sourcetype. Splunk default index is main (unless you have created your own). Also the tutorial data belong to two sourcetypes access and secure. So your base search could be. Following is an example for base search it may vary based on how you have added data. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype=access*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There is a scope of using Post Processing in your searches if you want to add multiple search to single dashboard. However, that is slightly advanced topic which you can learn from Splunk Docs once you are comfortable with SPL commands.&lt;/P&gt;

&lt;P&gt;PS:  Immediately after adding the data Splunk gives you an option to search Added data (&lt;STRONG&gt;Start Searching&lt;/STRONG&gt;)  which builds a sample base search.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 03:08:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-the-Splunk-Tutorial-data-how-to-find-the-number-of-hits/m-p/368776#M108705</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-03-22T03:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Splunk Tutorial data, how to find the number of hits and top 20 category and top 20 domain?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-the-Splunk-Tutorial-data-how-to-find-the-number-of-hits/m-p/368777#M108706</link>
      <description>&lt;P&gt;@rishabh4 - Did one of the answers below help provide a solution your question? If yes, please click “Accept” below the best answer to resolve this post and upvote anything that was helpful. If no, please leave a comment with more feedback. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 16:44:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-the-Splunk-Tutorial-data-how-to-find-the-number-of-hits/m-p/368777#M108706</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2017-03-22T16:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using the Splunk Tutorial data, how to find the number of hits and top 20 category and top 20 domain?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-the-Splunk-Tutorial-data-how-to-find-the-number-of-hits/m-p/368778#M108707</link>
      <description>&lt;P&gt;Listed below all required spl-query::&lt;/P&gt;

&lt;P&gt;Case-1 : Total Number of Hits:&lt;/P&gt;

&lt;P&gt;==============index=ds |stats count by clientip |stats sum(count) as Total_Number_of_Hits=======================&lt;/P&gt;

&lt;P&gt;Note: Ensure to replace index name: ds with your own created or default-main&lt;BR /&gt;
Explanation : Number of hits can be calculated by number of individual hits on server by each client&lt;/P&gt;

&lt;P&gt;Case-2 : Top 20 category and Domain :&lt;/P&gt;

&lt;P&gt;===================index=ds | top 20 categoryId showperc=f showcount=t |table categoryId |join  [search index=ds | top 20 referer_domain showperc=f showcount=t |table referer_domain] ============================&lt;/P&gt;

&lt;P&gt;Explanation: separately find domain and category and then use join to get single result with combination of both&lt;BR /&gt;
Note: Find suitable fields to get desire result like domain and categoryId here&lt;/P&gt;

&lt;P&gt;Case-3 : status code count :&lt;/P&gt;

&lt;P&gt;=====================index=ds  status=* |stats count as "Status code count"====================&lt;/P&gt;

&lt;P&gt;Explanation : Gives count of all the status code like status 401-faliure, status 200-success ..&lt;/P&gt;

&lt;P&gt;In addition i have attached Dashboard snapshot with all these cases-data as separate panel embedded in single dashboard.&lt;/P&gt;

&lt;P&gt;Happy Splunking :&lt;IMG src="https://community.splunk.com/storage/temp/274547-ds-all-data-dashboard.jpg" alt="alt text" /&gt;&amp;gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/274548-top-category-and-domain.jpg" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:02:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-the-Splunk-Tutorial-data-how-to-find-the-number-of-hits/m-p/368778#M108707</guid>
      <dc:creator>dibyanshu</dc:creator>
      <dc:date>2020-09-30T02:02:10Z</dc:date>
    </item>
  </channel>
</rss>

