<?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 to write query for too many blocked traffic to one single destination in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-query-to-detect-too-much-blocked-traffic-to-one/m-p/608374#M211526</link>
    <description>&lt;P&gt;First, it is imperative to show sample data. &amp;nbsp;Second, the phrase "doesn't work" conveys very little information. &amp;nbsp;You kind of described what you expect, but didn't provide sample output to demonstrate what "doesn't work".&lt;/P&gt;&lt;P&gt;Now, to your query - again, I have nothing to base this on except comparing your stats command with your desired output: the stats command as written will give out fields "num", `values(start_time)`, and "src_ip";&amp;nbsp;it will &lt;EM&gt;not&lt;/EM&gt; give hostname and destination_ip.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Aug 2022 02:41:59 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2022-08-05T02:41:59Z</dc:date>
    <item>
      <title>How to write query to detect too much blocked traffic to one single destination?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-query-to-detect-too-much-blocked-traffic-to-one/m-p/608364#M211524</link>
      <description>&lt;P&gt;I have created a query to detect too much blocked traffic to one single destination.Somehow this doesn't work. Help me to resolve this.&lt;/P&gt;
&lt;P&gt;bin _time span = 5m as timespan | eval start time = strptime(connection_start_time,"%Y-%m-%d %H:%M:%S")&lt;/P&gt;
&lt;P&gt;|stats dc(D_IP)as num values (start_time)by src_ip | search num&amp;gt;3 | sort num desc&lt;/P&gt;
&lt;P&gt;I want to display the src ip,hostname,destination ip, count&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 14:57:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-query-to-detect-too-much-blocked-traffic-to-one/m-p/608364#M211524</guid>
      <dc:creator>Pooja_R</dc:creator>
      <dc:date>2022-08-05T14:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to write query for too many blocked traffic to one single destination</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-query-to-detect-too-much-blocked-traffic-to-one/m-p/608374#M211526</link>
      <description>&lt;P&gt;First, it is imperative to show sample data. &amp;nbsp;Second, the phrase "doesn't work" conveys very little information. &amp;nbsp;You kind of described what you expect, but didn't provide sample output to demonstrate what "doesn't work".&lt;/P&gt;&lt;P&gt;Now, to your query - again, I have nothing to base this on except comparing your stats command with your desired output: the stats command as written will give out fields "num", `values(start_time)`, and "src_ip";&amp;nbsp;it will &lt;EM&gt;not&lt;/EM&gt; give hostname and destination_ip.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 02:41:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-query-to-detect-too-much-blocked-traffic-to-one/m-p/608374#M211526</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-08-05T02:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to write query for too many blocked traffic to one single destination?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-query-to-detect-too-much-blocked-traffic-to-one/m-p/608478#M211564</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248267"&gt;@Pooja_R&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I agree with&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;, could you better describe what in your search don't work?&lt;/P&gt;&lt;P&gt;Anyway, to display a value field in a stats command, you can use the values() option, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| bin _time span = 5m 
| stats 
   dc(D_IP)as dest_ip_count 
   earliest(_time) AS start_time 
   values(host) AS hostname 
   values(dest_ip) AS dest_ip 
   BY src_ip 
| search dest_ip_count&amp;gt;3 
| eval start_time=strptime(connection_start_time,"%Y-%m-%d %H:%M:%S")
| sort -dest_ip_count&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 14:45:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-query-to-detect-too-much-blocked-traffic-to-one/m-p/608478#M211564</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-08-05T14:45:00Z</dc:date>
    </item>
  </channel>
</rss>

