<?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 inputlookup to match a field value using a variable in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-to-match-a-field-value-using-a-variable/m-p/541104#M153176</link>
    <description>&lt;P&gt;Hello Splunk team, I'm trying to append columns based in a search of a field (Network = Network_CIDR) in &lt;STRONG&gt;Ashland-Networks-EAs.csv&lt;/STRONG&gt; , Network_CIDR is a variable, but I don't get any match, not sure why.&lt;/P&gt;&lt;P&gt;sourcetype=ib:ipam:network index=ib_ipam | eval &lt;STRONG&gt;Network_CIDR=address."/".cidr&lt;/STRONG&gt; | search view = "Ashland" | eval utilization=round(utilization, 1) | eval allocation=round(allocation, 1) | sort address | rename timestamp as Timestamp, view as "Network View", address as Network, cidr as CIDR, utilization as "DHCPv4 Utilization %", address_total as Total, address_alloc as Allocated, address_reserved as Reserved, address_assigned as Assigned, protocol as Protocol, allocation as "Utilization %", address_unmanaged as Unmanaged | table Timestamp, "Network View", Network, CIDR, Total, Allocated, Reserved, Assigned, Protocol, "Utilization %", Unmanaged, &lt;STRONG&gt;Network_CIDR&lt;/STRONG&gt; | appendcols [|inputlookup &lt;STRONG&gt;Ashland-Networks-EAs.csv&lt;/STRONG&gt; where (&lt;STRONG&gt;Network =&lt;/STRONG&gt; &lt;STRONG&gt;Network_CIDR&lt;/STRONG&gt;) | table Site_ID_DDI, Region_DDI, Country_DDI, City_DDI, Comment]&lt;/P&gt;&lt;P&gt;I have changed "where" option by "search" option in the appendcols part, but also is not matching any valuae and I get blank values in the columns added.&lt;/P&gt;&lt;P&gt;sourcetype=ib:ipam:network index=ib_ipam | eval &lt;STRONG&gt;Network_CIDR=address."/".cidr&lt;/STRONG&gt; | search view = "Ashland" | eval utilization=round(utilization, 1) | eval allocation=round(allocation, 1) | sort address | rename timestamp as Timestamp, view as "Network View", address as Network, cidr as CIDR, utilization as "DHCPv4 Utilization %", address_total as Total, address_alloc as Allocated, address_reserved as Reserved, address_assigned as Assigned, protocol as Protocol, allocation as "Utilization %", address_unmanaged as Unmanaged, Network_CIDR| table Timestamp, "Network View", Network, CIDR, Total, Allocated, Reserved, Assigned, Protocol, "Utilization %", Unmanaged, &lt;STRONG&gt;Network_CIDR&lt;/STRONG&gt; | appendcols [|inputlookup Ashland-Networks-EAs.csv | &lt;STRONG&gt;search Network = Network_CIDR&lt;/STRONG&gt; | rename Network as "Network/Mask" | table Network/Mask, Site_ID_DDI, Region_DDI, CountryDDI, City_DDI, Comment]&lt;/P&gt;&lt;P&gt;Basically I want to add new cols from&amp;nbsp;Ashland-Networks-EAs.csv at the end of each row that match with the Network field.&lt;/P&gt;&lt;P&gt;If&amp;nbsp; I do the below search on Ashland-Networks-EAs.csv, I can get the info for&amp;nbsp;10.168.135.0/24.&lt;/P&gt;&lt;P&gt;|inputlookup Ashland-Networks-EAs.csv |search Network = 10.168.135.0/24| fields Network, Site_ID_DDI, Region_DDI, Country_DDI, City_DDI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe this is not the correct way to do what I want to do, but&amp;nbsp; Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Omar.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2021 03:06:47 GMT</pubDate>
    <dc:creator>omun0z</dc:creator>
    <dc:date>2021-02-24T03:06:47Z</dc:date>
    <item>
      <title>inputlookup to match a field value using a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-to-match-a-field-value-using-a-variable/m-p/541104#M153176</link>
      <description>&lt;P&gt;Hello Splunk team, I'm trying to append columns based in a search of a field (Network = Network_CIDR) in &lt;STRONG&gt;Ashland-Networks-EAs.csv&lt;/STRONG&gt; , Network_CIDR is a variable, but I don't get any match, not sure why.&lt;/P&gt;&lt;P&gt;sourcetype=ib:ipam:network index=ib_ipam | eval &lt;STRONG&gt;Network_CIDR=address."/".cidr&lt;/STRONG&gt; | search view = "Ashland" | eval utilization=round(utilization, 1) | eval allocation=round(allocation, 1) | sort address | rename timestamp as Timestamp, view as "Network View", address as Network, cidr as CIDR, utilization as "DHCPv4 Utilization %", address_total as Total, address_alloc as Allocated, address_reserved as Reserved, address_assigned as Assigned, protocol as Protocol, allocation as "Utilization %", address_unmanaged as Unmanaged | table Timestamp, "Network View", Network, CIDR, Total, Allocated, Reserved, Assigned, Protocol, "Utilization %", Unmanaged, &lt;STRONG&gt;Network_CIDR&lt;/STRONG&gt; | appendcols [|inputlookup &lt;STRONG&gt;Ashland-Networks-EAs.csv&lt;/STRONG&gt; where (&lt;STRONG&gt;Network =&lt;/STRONG&gt; &lt;STRONG&gt;Network_CIDR&lt;/STRONG&gt;) | table Site_ID_DDI, Region_DDI, Country_DDI, City_DDI, Comment]&lt;/P&gt;&lt;P&gt;I have changed "where" option by "search" option in the appendcols part, but also is not matching any valuae and I get blank values in the columns added.&lt;/P&gt;&lt;P&gt;sourcetype=ib:ipam:network index=ib_ipam | eval &lt;STRONG&gt;Network_CIDR=address."/".cidr&lt;/STRONG&gt; | search view = "Ashland" | eval utilization=round(utilization, 1) | eval allocation=round(allocation, 1) | sort address | rename timestamp as Timestamp, view as "Network View", address as Network, cidr as CIDR, utilization as "DHCPv4 Utilization %", address_total as Total, address_alloc as Allocated, address_reserved as Reserved, address_assigned as Assigned, protocol as Protocol, allocation as "Utilization %", address_unmanaged as Unmanaged, Network_CIDR| table Timestamp, "Network View", Network, CIDR, Total, Allocated, Reserved, Assigned, Protocol, "Utilization %", Unmanaged, &lt;STRONG&gt;Network_CIDR&lt;/STRONG&gt; | appendcols [|inputlookup Ashland-Networks-EAs.csv | &lt;STRONG&gt;search Network = Network_CIDR&lt;/STRONG&gt; | rename Network as "Network/Mask" | table Network/Mask, Site_ID_DDI, Region_DDI, CountryDDI, City_DDI, Comment]&lt;/P&gt;&lt;P&gt;Basically I want to add new cols from&amp;nbsp;Ashland-Networks-EAs.csv at the end of each row that match with the Network field.&lt;/P&gt;&lt;P&gt;If&amp;nbsp; I do the below search on Ashland-Networks-EAs.csv, I can get the info for&amp;nbsp;10.168.135.0/24.&lt;/P&gt;&lt;P&gt;|inputlookup Ashland-Networks-EAs.csv |search Network = 10.168.135.0/24| fields Network, Site_ID_DDI, Region_DDI, Country_DDI, City_DDI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe this is not the correct way to do what I want to do, but&amp;nbsp; Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Omar.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 03:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-to-match-a-field-value-using-a-variable/m-p/541104#M153176</guid>
      <dc:creator>omun0z</dc:creator>
      <dc:date>2021-02-24T03:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup to match a field value using a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-to-match-a-field-value-using-a-variable/m-p/541113#M153181</link>
      <description>&lt;P&gt;CHeck this:&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Using-CIDR-in-a-lookup-table/m-p/35792#M7873" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/Using-CIDR-in-a-lookup-table/m-p/35792#M7873&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 05:07:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-to-match-a-field-value-using-a-variable/m-p/541113#M153181</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-24T05:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: inputlookup to match a field value using a variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/inputlookup-to-match-a-field-value-using-a-variable/m-p/541239#M153236</link>
      <description>&lt;P&gt;Thanks&amp;nbsp; manjunathmeti for your response, but basically I want to treat the Network/CIDR as a text string,&amp;nbsp; think I don't need to use cdirmatch function.&amp;nbsp; But, maybe I need to do this in a different way.. Is there a way I can set an &lt;STRONG&gt;eval myVariable=[|inputlookup&amp;nbsp;Ashland-Networks-EAs.csv&amp;nbsp;where (Network =&amp;nbsp;Network_CIDR&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;) | table Site_ID_DDI, Region_DDI, Country_DDI, City_DDI, Comment]&lt;/STRONG&gt; and add &lt;STRONG&gt;myVariable&lt;/STRONG&gt; at the end in the table?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks in davance for your help.&lt;/P&gt;&lt;P&gt;Omar.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 16:23:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/inputlookup-to-match-a-field-value-using-a-variable/m-p/541239#M153236</guid>
      <dc:creator>omun0z</dc:creator>
      <dc:date>2021-02-24T16:23:38Z</dc:date>
    </item>
  </channel>
</rss>

