<?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 multisearch using values from more than one lookup? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-multisearch-using-values-from-more-than-one-lookup/m-p/626698#M217823</link>
    <description>&lt;P&gt;I have two lookups&lt;BR /&gt;RLQuotas: Endpoint, Endpoint Name, filter, quota, Window&lt;BR /&gt;RLFilters: Attribute, filter&lt;BR /&gt;&lt;BR /&gt;I want to loop through all the endpoints. all endpoints have a specific window, quota and filter and i am searching it based on filter attribute&lt;BR /&gt;I want output fields&amp;nbsp;Endpoint Name, filter, Quota&lt;BR /&gt;&lt;BR /&gt;This is the query i came up with&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;| inputlookup ID-RL-Quotas | lookup ID-RL-Filters Filter | fields Endpoint, "Endpoint Name", Attribute, Window, Quota, Filter | rename "Endpoint Name" as EndpointName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| map [| eval Window = tonumber($Window$) | search sourcetype="some"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;http_url = "$Endpoint$"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;minutesago=Window&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval ip = mvindex(split(http_remoteip,","),0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval EndpointName = "$EndpointName$"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval WindowI ="$Window$"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval QuotaI="$Quota$"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval FilterI="$Filter$"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| search $Attribute$ = "*"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| stats values(EndpointName) as "Endpoint Name", values(FilterI) as Filter, values(WindowI) as Window, values(QuotaI) as Quota, count by $Attribute$&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| where count &amp;gt;= 0.8 * $Quota$&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| sort -count] maxsearches=10000&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;This only gives me one filter output not all&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2023 04:15:03 GMT</pubDate>
    <dc:creator>amitrinx</dc:creator>
    <dc:date>2023-05-26T04:15:03Z</dc:date>
    <item>
      <title>How to multisearch using values from more than one lookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-multisearch-using-values-from-more-than-one-lookup/m-p/626698#M217823</link>
      <description>&lt;P&gt;I have two lookups&lt;BR /&gt;RLQuotas: Endpoint, Endpoint Name, filter, quota, Window&lt;BR /&gt;RLFilters: Attribute, filter&lt;BR /&gt;&lt;BR /&gt;I want to loop through all the endpoints. all endpoints have a specific window, quota and filter and i am searching it based on filter attribute&lt;BR /&gt;I want output fields&amp;nbsp;Endpoint Name, filter, Quota&lt;BR /&gt;&lt;BR /&gt;This is the query i came up with&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;| inputlookup ID-RL-Quotas | lookup ID-RL-Filters Filter | fields Endpoint, "Endpoint Name", Attribute, Window, Quota, Filter | rename "Endpoint Name" as EndpointName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| map [| eval Window = tonumber($Window$) | search sourcetype="some"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;http_url = "$Endpoint$"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;minutesago=Window&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval ip = mvindex(split(http_remoteip,","),0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval EndpointName = "$EndpointName$"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval WindowI ="$Window$"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval QuotaI="$Quota$"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| eval FilterI="$Filter$"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| search $Attribute$ = "*"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| stats values(EndpointName) as "Endpoint Name", values(FilterI) as Filter, values(WindowI) as Window, values(QuotaI) as Quota, count by $Attribute$&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| where count &amp;gt;= 0.8 * $Quota$&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| sort -count] maxsearches=10000&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;This only gives me one filter output not all&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 04:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-multisearch-using-values-from-more-than-one-lookup/m-p/626698#M217823</guid>
      <dc:creator>amitrinx</dc:creator>
      <dc:date>2023-05-26T04:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Multisearch using values from more than one lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-multisearch-using-values-from-more-than-one-lookup/m-p/626705#M217824</link>
      <description>&lt;P&gt;Firstly, the topic says "multisearch" and you're using map.&lt;/P&gt;&lt;P&gt;Secondly, you don't have any event-generating commands in your map.&lt;/P&gt;&lt;P&gt;Thirdly, most probably this is&lt;EM&gt;not&lt;/EM&gt; the way to solve your problem.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 05:43:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-multisearch-using-values-from-more-than-one-lookup/m-p/626705#M217824</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-01-11T05:43:49Z</dc:date>
    </item>
  </channel>
</rss>

