<?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 Search command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-command/m-p/667272#M228912</link>
    <description>&lt;P&gt;Pro tip: Do not assume anyone knows anything about your data.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Update the title to a question that clearly defines the problem. &amp;nbsp;This will help others in the community. &amp;nbsp;"Splunk search command" conveys no information.&lt;/LI&gt;&lt;LI&gt;Always illustrate relevant data. &amp;nbsp;For example, which field contains URI?&lt;/LI&gt;&lt;LI&gt;Be conscious that many natural language terms are ambiguous. &amp;nbsp;For example, "top ten URI's" can mean many different things. &amp;nbsp;What is your definition related to your data?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If the field URI contains URI, and "top ten" means the ten URI's that appear in the most events, this can be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count by URI&lt;/LI-CODE&gt;&lt;P&gt;I recommend that you read/watch some tutorials.&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchTutorial/" target="_blank" rel="noopener"&gt;Search Tutorial&lt;/A&gt;&amp;nbsp;can be a good place to start.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Nov 2023 09:34:43 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-11-03T09:34:43Z</dc:date>
    <item>
      <title>Splunk Search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-command/m-p/667258#M228905</link>
      <description>&lt;P&gt;This would be a piece of cake for someone who uses SPLUNK.&lt;BR /&gt;I am&amp;nbsp; doing a search using the 'stats', çount' and sort commands in the botsv1 index.&lt;/P&gt;&lt;P&gt;I am to find the top ten URI's in ascending order. What is the SPL command?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 07:37:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-command/m-p/667258#M228905</guid>
      <dc:creator>Mouseman123</dc:creator>
      <dc:date>2023-11-03T07:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-command/m-p/667272#M228912</link>
      <description>&lt;P&gt;Pro tip: Do not assume anyone knows anything about your data.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Update the title to a question that clearly defines the problem. &amp;nbsp;This will help others in the community. &amp;nbsp;"Splunk search command" conveys no information.&lt;/LI&gt;&lt;LI&gt;Always illustrate relevant data. &amp;nbsp;For example, which field contains URI?&lt;/LI&gt;&lt;LI&gt;Be conscious that many natural language terms are ambiguous. &amp;nbsp;For example, "top ten URI's" can mean many different things. &amp;nbsp;What is your definition related to your data?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If the field URI contains URI, and "top ten" means the ten URI's that appear in the most events, this can be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count by URI&lt;/LI-CODE&gt;&lt;P&gt;I recommend that you read/watch some tutorials.&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchTutorial/" target="_blank" rel="noopener"&gt;Search Tutorial&lt;/A&gt;&amp;nbsp;can be a good place to start.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 09:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-command/m-p/667272#M228912</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-11-03T09:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-command/m-p/667286#M228923</link>
      <description>&lt;P&gt;Thanks for responding so quickly!!!&lt;BR /&gt;&lt;BR /&gt;The SPL commands I have been trying is as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=indexname
|stats count by domain,src_ip
|sort -count
|stats list(domain) as Domain, list(count) as count, sum(count) as total by src_ip
|sort -total | head 10
|fields - total&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;The task i have been given is:&lt;BR /&gt;&lt;/SPAN&gt;Use the stats, count, and sort search terms to display the top ten URI's in ascending order.&lt;BR /&gt;This is from the botsv1 dataset&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 12:11:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-command/m-p/667286#M228923</guid>
      <dc:creator>Mouseman123</dc:creator>
      <dc:date>2023-11-03T12:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-command/m-p/667372#M228948</link>
      <description>&lt;P&gt;Note: botsv1 means absolutely nothing to most volunteers in this forum. &amp;nbsp;If there is something special about this dataset, you need to explain very clearly. &amp;nbsp;Also important: when you have a sample code that doesn't do what you wanted, you need to illustrate what it actually outputs, and explain why it doesn't meet your requirement if that's not painfully obvious. &amp;nbsp;Did your sample code give you desired result?&lt;/P&gt;&lt;P&gt;Based on your sample code, I speculate that so-called URI is in the field src_ip? &amp;nbsp;Why do you use list, not values? &amp;nbsp;What is the use of list of count? &amp;nbsp;What's wrong with this simpler formula?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=indexname
|stats values(domain) as Domain count as total by src_ip
| sort -total | head 10&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without SPL, can you explain/illustrate what data is like (anonymize as necessary), illustrate what the end result look like using illustrated data, and describe the logic between that data and your desired result? &amp;nbsp;This is the best way to get help with data analytics.&lt;/P&gt;&lt;P&gt;i can speculate that you want to display individual count of domains by src_ip, too. &amp;nbsp;If so, designing a proper visual vocabulary is a lot better.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=indexname
|stats count by domain,src_ip
| sort - count
|stats list(count . " (" . domain . ")") as DomainCount, sum(count) as total by src_ip
|sort - total DomainCount | head 10
|fields - total&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just note that this is mathematically equivalent to your code. &amp;nbsp;So, you will need to illustrate the output and explain why that's not the desired result.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2023 10:58:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-command/m-p/667372#M228948</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-11-04T10:58:12Z</dc:date>
    </item>
  </channel>
</rss>

