<?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 Search Use Stats Count Filter Two Fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-use-stats-count-filter-two-fields/m-p/641706#M222294</link>
    <description>&lt;P&gt;One thing is not completely clear in your description. &amp;nbsp;Any src_ip that makes contact with "&lt;SPAN&gt;more than 5 destination IP within 1 minutes" must have appeared "more than 1 time" during the same minute. &amp;nbsp;Is there some additional constraint?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If there is no additional condition, you can use this search&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| bin span=1m _time
| stats dc(DestAddress) as unique_dest by src_ip _time
| where unique_dest &amp;gt; 5&lt;/LI-CODE&gt;&lt;P&gt;This is assuming that src_ip and DestAddress are present in the same event. &amp;nbsp;The question doesn't seem to make sense if an event only contains src_ip or DestAddress but not both, unless there is some other way to link src_ip and DestAddress. &amp;nbsp;If that is the case, you will need to analyze that link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2023 06:04:26 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-04-28T06:04:26Z</dc:date>
    <item>
      <title>How to search use stats count filter two fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-use-stats-count-filter-two-fields/m-p/641646#M222266</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I am doing a search for src_ip and DestAdd in a database within a 1 minute time frame. I need to look for src_ip which value that is not greater than 1 and DestAdd that is not greater than 5. Here is the description of the problem:&amp;nbsp;&lt;SPAN&gt;when any of these&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;with the same source IP more than 1 time, across more than 5 destination IP within 1 minutes. I wonder if my query correct. Can anyone advise? Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;|bin span=1m _time |stats count(src_ip) as src_ip, count(DestAddress) as DestAddress by _time  |where (src_ip &amp;gt; 1 and DestAddress&amp;gt;5)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 13:41:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-use-stats-count-filter-two-fields/m-p/641646#M222266</guid>
      <dc:creator>longmen</dc:creator>
      <dc:date>2023-04-28T13:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Search Use Stats Count Filter Two Fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-use-stats-count-filter-two-fields/m-p/641706#M222294</link>
      <description>&lt;P&gt;One thing is not completely clear in your description. &amp;nbsp;Any src_ip that makes contact with "&lt;SPAN&gt;more than 5 destination IP within 1 minutes" must have appeared "more than 1 time" during the same minute. &amp;nbsp;Is there some additional constraint?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If there is no additional condition, you can use this search&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| bin span=1m _time
| stats dc(DestAddress) as unique_dest by src_ip _time
| where unique_dest &amp;gt; 5&lt;/LI-CODE&gt;&lt;P&gt;This is assuming that src_ip and DestAddress are present in the same event. &amp;nbsp;The question doesn't seem to make sense if an event only contains src_ip or DestAddress but not both, unless there is some other way to link src_ip and DestAddress. &amp;nbsp;If that is the case, you will need to analyze that link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 06:04:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-use-stats-count-filter-two-fields/m-p/641706#M222294</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-04-28T06:04:26Z</dc:date>
    </item>
  </channel>
</rss>

