<?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 How To Filter IP Field Using Subnet Value Stored In Variable in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-To-Filter-IP-Field-Using-Subnet-Value-Stored-In-Variable/m-p/529000#M149347</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a drill down dashboard. Basically I want to pass a subnet value (which is currently represented as a string) from one pane to another search pane and search on data in that query using the subnet value. I have tried several methods and none seem to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally I thought something like the below would work in pseudo code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Search ... |
eval subnet_value=$subnet value from first query$ |
where ipv4=subnet_value &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I get back no results. Perhaps someone has some tips on some things I can try next as I am stuck currently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
    <pubDate>Wed, 11 Nov 2020 15:46:54 GMT</pubDate>
    <dc:creator>joemarty82</dc:creator>
    <dc:date>2020-11-11T15:46:54Z</dc:date>
    <item>
      <title>How To Filter IP Field Using Subnet Value Stored In Variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-To-Filter-IP-Field-Using-Subnet-Value-Stored-In-Variable/m-p/529000#M149347</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a drill down dashboard. Basically I want to pass a subnet value (which is currently represented as a string) from one pane to another search pane and search on data in that query using the subnet value. I have tried several methods and none seem to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally I thought something like the below would work in pseudo code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Search ... |
eval subnet_value=$subnet value from first query$ |
where ipv4=subnet_value &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I get back no results. Perhaps someone has some tips on some things I can try next as I am stuck currently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 15:46:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-To-Filter-IP-Field-Using-Subnet-Value-Stored-In-Variable/m-p/529000#M149347</guid>
      <dc:creator>joemarty82</dc:creator>
      <dc:date>2020-11-11T15:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: How To Filter IP Field Using Subnet Value Stored In Variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-To-Filter-IP-Field-Using-Subnet-Value-Stored-In-Variable/m-p/529079#M149377</link>
      <description>&lt;P&gt;how are you passing your subnet value?&lt;/P&gt;&lt;P&gt;can you share example subnet value?&lt;/P&gt;&lt;P&gt;you can't compare ipv4 with subnet (for example 10.10.10.0/24) as you mentioned in your pseudo code&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;where ipv4=subnet_value&lt;/PRE&gt;&lt;P&gt;instead, you get value to current search from other dashboard ( I believe your subnet value coming from dashboard would be something like 10.10.10.0/24 ). you can write this value to lookup using outputlookup command from current search. define lookup where lookup can match cidr for specified field.&lt;/P&gt;&lt;P&gt;and then you have to use lookup command instead of where like above.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 06:32:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-To-Filter-IP-Field-Using-Subnet-Value-Stored-In-Variable/m-p/529079#M149377</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-11-12T06:32:09Z</dc:date>
    </item>
  </channel>
</rss>

