<?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: Unique IP count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Unique-IP-count/m-p/453617#M128362</link>
    <description>&lt;P&gt;Hi @jdhavo,&lt;/P&gt;

&lt;P&gt;The stats command  &lt;CODE&gt;dc&lt;/CODE&gt; gives the distinct count as shown here : &lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Stats"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Stats&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you want the list of unique IP addresses you can use the &lt;CODE&gt;values&lt;/CODE&gt; stats command. And if you want you can have both : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk_server=* index="mysiteindes" host=NXR4RIET313 SCRAPY | stats values(src_ip) as src_ip dc(src_ip) as distinctCountIP 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that values puts everything in the same block so you can use &lt;CODE&gt;mvexpand&lt;/CODE&gt; command to split the results out into multiple lines.&lt;/P&gt;

&lt;P&gt;In either case make sure the src_ip field exists or you won't be able to run anything &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David &lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2019 18:49:17 GMT</pubDate>
    <dc:creator>DavidHourani</dc:creator>
    <dc:date>2019-05-13T18:49:17Z</dc:date>
    <item>
      <title>Unique IP count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unique-IP-count/m-p/453614#M128359</link>
      <description>&lt;P&gt;It seems like something that has been answered before but i have been unable to find the answer.&lt;BR /&gt;
Is it possible to run a query that provides unique IP source addresses when searching for a particular string?&lt;BR /&gt;
I've tried this however i'm not having any success:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk_server=* index="mysiteindes" host=NXR4RIET313 SCRAPY | stats dc(src_ip)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Would be particularly helpful if a portion of the IP (Host, Network) could be queried.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 11:43:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unique-IP-count/m-p/453614#M128359</guid>
      <dc:creator>jdhavo</dc:creator>
      <dc:date>2019-05-13T11:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Unique IP count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unique-IP-count/m-p/453615#M128360</link>
      <description>&lt;P&gt;Does your Splunk data contains IP address in them?&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 13:28:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unique-IP-count/m-p/453615#M128360</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-05-13T13:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unique IP count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unique-IP-count/m-p/453616#M128361</link>
      <description>&lt;P&gt;The query you have right now simply returns the &lt;STRONG&gt;number&lt;/STRONG&gt; of unique IP addresses. If you want the actual list of unique addresses, try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk_server=* index="mysiteindes" host=NXR4RIET313 SCRAPY | stats values(src_ip)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk_server=* index="mysiteindes" host=NXR4RIET313 SCRAPY | stats count by src_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To also get the number of events for each unique address.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 15:02:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unique-IP-count/m-p/453616#M128361</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-05-13T15:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unique IP count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Unique-IP-count/m-p/453617#M128362</link>
      <description>&lt;P&gt;Hi @jdhavo,&lt;/P&gt;

&lt;P&gt;The stats command  &lt;CODE&gt;dc&lt;/CODE&gt; gives the distinct count as shown here : &lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Stats"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Stats&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you want the list of unique IP addresses you can use the &lt;CODE&gt;values&lt;/CODE&gt; stats command. And if you want you can have both : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk_server=* index="mysiteindes" host=NXR4RIET313 SCRAPY | stats values(src_ip) as src_ip dc(src_ip) as distinctCountIP 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that values puts everything in the same block so you can use &lt;CODE&gt;mvexpand&lt;/CODE&gt; command to split the results out into multiple lines.&lt;/P&gt;

&lt;P&gt;In either case make sure the src_ip field exists or you won't be able to run anything &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David &lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 18:49:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Unique-IP-count/m-p/453617#M128362</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-13T18:49:17Z</dc:date>
    </item>
  </channel>
</rss>

