<?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: map command with functions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/map-command-with-functions/m-p/572279#M199455</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240106"&gt;@maramel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since map uses quotation marks, you must use \ for all special characters within you search.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| map search=" | search index=my_other_index&amp;nbsp; earliest=-6h | rename id as id2 | dedup id2 | eval searchip=$src_ip$ | eval matches=if(cidrmatch(cidr_block, searchip), \"true\", \"false\") | table id2 searchip matches cidr_block"&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Oct 2021 14:05:32 GMT</pubDate>
    <dc:creator>IZ88</dc:creator>
    <dc:date>2021-10-25T14:05:32Z</dc:date>
    <item>
      <title>map command with functions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/map-command-with-functions/m-p/572275#M199454</link>
      <description>&lt;P&gt;I'm trying to use the map command and it seems to fail when I try using some functions within the subsearch (specifically: cidrmatch()).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This search returns a correctly-populated table of all the fields except for the "matches" field which is just empty&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;index=my_index earliest=-5m&lt;BR /&gt;| table _time src_ip&lt;BR /&gt;| map search=" | search index=my_other_index&amp;nbsp; earliest=-6h | rename id as id2 | dedup id2 | eval searchip=$src_ip$ | eval matches=if(cidrmatch(cidr_block, searchip), "true", "false") | table id2 searchip matches cidr_block"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Note: my goal is to join two searches but not based on a common field, based on cidrmatching ips from one search to the cidrblocks in the other. I don't want to use lookup tables as I want both to be dynamic.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 13:54:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/map-command-with-functions/m-p/572275#M199454</guid>
      <dc:creator>maramel</dc:creator>
      <dc:date>2021-10-25T13:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: map command with functions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/map-command-with-functions/m-p/572279#M199455</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240106"&gt;@maramel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since map uses quotation marks, you must use \ for all special characters within you search.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| map search=" | search index=my_other_index&amp;nbsp; earliest=-6h | rename id as id2 | dedup id2 | eval searchip=$src_ip$ | eval matches=if(cidrmatch(cidr_block, searchip), \"true\", \"false\") | table id2 searchip matches cidr_block"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 14:05:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/map-command-with-functions/m-p/572279#M199455</guid>
      <dc:creator>IZ88</dc:creator>
      <dc:date>2021-10-25T14:05:32Z</dc:date>
    </item>
  </channel>
</rss>

