<?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 CIDR search against multivalue fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/CIDR-search-against-multivalue-fields/m-p/45326#M179293</link>
    <description>&lt;P&gt;I'm using the &lt;A href="http://splunk-base.splunk.com/apps/22292/splunk-for-cisco-ips"&gt;Splunk for Cisco IPS&lt;/A&gt; app which outputs some events with multiple targets with IP addresses: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;target=a.a.a.a target=b.b.b.b target=c.c.c.c ... target=n.n.n.n&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;If I search with target=a.a.a.0/24, then I get a match, but searching for target=b.b.b.0/24 or any of the later values does not match. Is there a way to properly CIDR search through all the values of a multivalue field? &lt;/P&gt;</description>
    <pubDate>Fri, 06 Jan 2012 16:20:03 GMT</pubDate>
    <dc:creator>rooney</dc:creator>
    <dc:date>2012-01-06T16:20:03Z</dc:date>
    <item>
      <title>CIDR search against multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CIDR-search-against-multivalue-fields/m-p/45326#M179293</link>
      <description>&lt;P&gt;I'm using the &lt;A href="http://splunk-base.splunk.com/apps/22292/splunk-for-cisco-ips"&gt;Splunk for Cisco IPS&lt;/A&gt; app which outputs some events with multiple targets with IP addresses: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;target=a.a.a.a target=b.b.b.b target=c.c.c.c ... target=n.n.n.n&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;If I search with target=a.a.a.0/24, then I get a match, but searching for target=b.b.b.0/24 or any of the later values does not match. Is there a way to properly CIDR search through all the values of a multivalue field? &lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2012 16:20:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CIDR-search-against-multivalue-fields/m-p/45326#M179293</guid>
      <dc:creator>rooney</dc:creator>
      <dc:date>2012-01-06T16:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: CIDR search against multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CIDR-search-against-multivalue-fields/m-p/45327#M179294</link>
      <description>&lt;P&gt;I would have expected this to work.  Alternately, I might suggest use of &lt;CODE&gt;where&lt;/CODE&gt; and &lt;CODE&gt;cidrmatch&lt;/CODE&gt;.  Something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blah blah blah | where cidrmatch(target,"b.b.b.0/24")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Jan 2012 22:25:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CIDR-search-against-multivalue-fields/m-p/45327#M179294</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-01-06T22:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: CIDR search against multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CIDR-search-against-multivalue-fields/m-p/45328#M179295</link>
      <description>&lt;P&gt;Unfortunately that yields the same result, matches with cidrmatch(target,"a.a.a.0/24") but nothing else.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jan 2012 05:11:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CIDR-search-against-multivalue-fields/m-p/45328#M179295</guid>
      <dc:creator>rooney</dc:creator>
      <dc:date>2012-01-07T05:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: CIDR search against multivalue fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CIDR-search-against-multivalue-fields/m-p/45329#M179296</link>
      <description>&lt;P&gt;The problem was the target, target_port, and target_locality fields hadn't actually been set as MV fields by default. So by adding the following, it now works properly:&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[cisco_ips_syslog]
REPORT-target = target,target_port,target_locality
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[target]
REGEX = target=\"(.+?)\"
FORMAT = target::$1
MV_ADD = True

[target_port]
REGEX = target_port=\"(.+?)\"
FORMAT = target_port::$1
MV_ADD = True

[target_locality]
REGEX = target_locality=\"(.+?)\"
FORMAT = target_locality::$1
MV_ADD = True
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Jan 2012 20:00:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CIDR-search-against-multivalue-fields/m-p/45329#M179296</guid>
      <dc:creator>rooney</dc:creator>
      <dc:date>2012-01-25T20:00:48Z</dc:date>
    </item>
  </channel>
</rss>

