<?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: Counting events based on IP Subnets in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492556#M137392</link>
    <description>&lt;P&gt;Sorry, typo, &lt;/P&gt;

&lt;P&gt;Ohio should be 10.10.20   and 10.10.21&lt;/P&gt;</description>
    <pubDate>Tue, 17 Mar 2020 14:05:45 GMT</pubDate>
    <dc:creator>tsheets13</dc:creator>
    <dc:date>2020-03-17T14:05:45Z</dc:date>
    <item>
      <title>Counting events based on IP Subnets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492555#M137391</link>
      <description>&lt;P&gt;I need to create a search to count the number of events in each geographic are of our network.&lt;/P&gt;

&lt;P&gt;Each geo area will consist of multiple subnets.&lt;/P&gt;

&lt;P&gt;Kentucky 10.10.10 10.10.11 10.10.12&lt;BR /&gt;
Ohio 10.10.10.20 10.10.10.21 &lt;BR /&gt;
Indiana 10.10.30 10.10.31 10.10.32 10.10.10.33.&lt;/P&gt;

&lt;P&gt;The report should simply output total by state:&lt;/P&gt;

&lt;P&gt;Kentucky       112&lt;BR /&gt;
Ohio               87&lt;BR /&gt;
Indiana          212&lt;/P&gt;

&lt;P&gt;All events have a full IP address but I've already used REX to assign the first 3 octets to the field SUBNET.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 14:04:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492555#M137391</guid>
      <dc:creator>tsheets13</dc:creator>
      <dc:date>2020-03-17T14:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Counting events based on IP Subnets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492556#M137392</link>
      <description>&lt;P&gt;Sorry, typo, &lt;/P&gt;

&lt;P&gt;Ohio should be 10.10.20   and 10.10.21&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 14:05:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492556#M137392</guid>
      <dc:creator>tsheets13</dc:creator>
      <dc:date>2020-03-17T14:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Counting events based on IP Subnets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492557#M137393</link>
      <description>&lt;P&gt;You could use a lookup table.&lt;/P&gt;

&lt;P&gt;Define a lookup file ("subnets.csv") with two columns: subnet and state.  Refer to the lookup file in your query.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your current search&amp;gt; | lookup subnets.csv subnet OUTPUT state | stats count by state
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Mar 2020 14:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492557#M137393</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-03-17T14:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Counting events based on IP Subnets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492558#M137394</link>
      <description>&lt;P&gt;I answered a very similar question not too long ago.&lt;BR /&gt;
Take a look here:  &lt;A href="https://answers.splunk.com/answers/801332/how-do-you-match-ip-address-with-ips-with-cidr-not.html#answer-802882"&gt;https://answers.splunk.com/answers/801332/how-do-you-match-ip-address-with-ips-with-cidr-not.html#answer-802882&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You don't need to do any fancy regex to extract parts of the IP address.  Make Splunk do the work with your lookup!  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Hope that helps!&lt;BR /&gt;
rmmiller&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 14:24:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492558#M137394</guid>
      <dc:creator>rmmiller</dc:creator>
      <dc:date>2020-03-17T14:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Counting events based on IP Subnets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492559#M137395</link>
      <description>&lt;P&gt;So the lookup would contain 2 columns, subnet and state and nothing else correct?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 14:24:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492559#M137395</guid>
      <dc:creator>tsheets13</dc:creator>
      <dc:date>2020-03-17T14:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Counting events based on IP Subnets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492560#M137396</link>
      <description>&lt;P&gt;Yes, for your application, you need to have 2 columns:  subnet and state.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 14:57:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492560#M137396</guid>
      <dc:creator>rmmiller</dc:creator>
      <dc:date>2020-03-17T14:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Counting events based on IP Subnets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492561#M137397</link>
      <description>&lt;P&gt;you can edit your question &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 15:35:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-events-based-on-IP-Subnets/m-p/492561#M137397</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2020-03-17T15:35:23Z</dc:date>
    </item>
  </channel>
</rss>

