<?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: cidrmatch() returning no matches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117544#M31332</link>
    <description>&lt;P&gt;You're welcome, feel free to upvote any useful answers &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jul 2015 03:29:45 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2015-07-13T03:29:45Z</dc:date>
    <item>
      <title>cidrmatch() returning no matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117538#M31326</link>
      <description>&lt;P&gt;I'm using &lt;CODE&gt;cidrmatch()&lt;/CODE&gt; to determine whether a particular IP is on a local network, but when I query Splunk it returns nothing even though there are local IP addresses in the ingested data.&lt;/P&gt;

&lt;P&gt;I'm running the following query:&lt;BR /&gt;
&lt;CODE&gt;index=main | stats count | eval ip=src_addr | eval network=if(cidrmatch("192.168.0.0/16",ip),"Local","Other") | stats count by ip, network&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;which returns no results, even though there are IP addresses in the 192.168.0.0/16 domain.&lt;/P&gt;

&lt;P&gt;What could be the issue?&lt;/P&gt;

&lt;P&gt;Could it be that the src_add field is saved a string. Is there a way for Splunk to save that as an IP address field?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 01:18:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117538#M31326</guid>
      <dc:creator>splunknewby</dc:creator>
      <dc:date>2015-07-13T01:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: cidrmatch() returning no matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117539#M31327</link>
      <description>&lt;P&gt;index=main | stats count |・・・・&lt;BR /&gt;
-&amp;gt;Field is only to count.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 01:44:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117539#M31327</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2015-07-13T01:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: cidrmatch() returning no matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117540#M31328</link>
      <description>&lt;P&gt;Or maybe a bit more detailed: What @HiroshiSatoh means is, you will loose any fields after the &lt;CODE&gt;stats count&lt;/CODE&gt; if you don't define them along side of the &lt;CODE&gt;stats&lt;/CODE&gt;. So you will only have a field called &lt;CODE&gt;count&lt;/CODE&gt; after the &lt;CODE&gt;stats count&lt;/CODE&gt; remove it form your search and it should return results as long you have a field called &lt;CODE&gt;src_addr&lt;/CODE&gt; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 02:17:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117540#M31328</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-07-13T02:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: cidrmatch() returning no matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117541#M31329</link>
      <description>&lt;P&gt;Hey MuS, I tried that and got a few hits. Only I now see a few 192.168.x.x addresses being classified as "Other"?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 02:20:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117541#M31329</guid>
      <dc:creator>splunknewby</dc:creator>
      <dc:date>2015-07-13T02:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: cidrmatch() returning no matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117542#M31330</link>
      <description>&lt;P&gt;could it be that you have some multivalue fields or the src_ip field is not always nummeric?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 02:39:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117542#M31330</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-07-13T02:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: cidrmatch() returning no matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117543#M31331</link>
      <description>&lt;P&gt;Ah! cheers, my address ingestion is doubling up for some reason. I used &lt;CODE&gt;mvindex&lt;/CODE&gt;to grab the first entry and ran &lt;CODE&gt;cidrmatch()&lt;/CODE&gt; with success.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 03:28:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117543#M31331</guid>
      <dc:creator>splunknewby</dc:creator>
      <dc:date>2015-07-13T03:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: cidrmatch() returning no matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117544#M31332</link>
      <description>&lt;P&gt;You're welcome, feel free to upvote any useful answers &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 03:29:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117544#M31332</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-07-13T03:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: cidrmatch() returning no matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117545#M31333</link>
      <description>&lt;P&gt;Quick question, is there a away to filter for ipv6 addresses?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 03:32:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117545#M31333</guid>
      <dc:creator>splunknewby</dc:creator>
      <dc:date>2015-07-13T03:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: cidrmatch() returning no matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117546#M31334</link>
      <description>&lt;P&gt;Sure, for example to use the cidrmatch() for 2001:0000:1234:1234:1234:1fff:2eee:3ddd address, you can just do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;........... | eval network=if(cidrmatch("2001:0000::/32",clientip), "local", "other")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Jul 2015 03:40:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117546#M31334</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-07-13T03:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: cidrmatch() returning no matches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117547#M31335</link>
      <description>&lt;P&gt;Hey Mus, is there a way to capture all private ipv6 addresses?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2015 22:47:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/cidrmatch-returning-no-matches/m-p/117547#M31335</guid>
      <dc:creator>splunknewby</dc:creator>
      <dc:date>2015-07-14T22:47:58Z</dc:date>
    </item>
  </channel>
</rss>

