<?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: index query results against inputlookup return stats/multiple stats in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/index-query-results-against-inputlookup-return-stats-multiple/m-p/667620#M229040</link>
    <description>&lt;P&gt;Thank you for the response. I did manage to figure out my issue. First was the use of the multiple lookups, when I created the first lookup, I used sort, that limited my results to &amp;gt; 5000, and I needed &amp;lt; 30k. I fixed that, creating the Inputlookup&amp;nbsp;ACResults.csv without the sort value that was limiting my results. (inputlookup was from Active Directory).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then used the following search:&lt;/P&gt;&lt;P&gt;&amp;nbsp; index=Myindex host=xx.xx.xx.xx "AAA user accounting Successful"&lt;/P&gt;&lt;P&gt;&amp;nbsp; | dedup user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then used lookup for where the user field values matched the field cn from my lookup:&lt;/P&gt;&lt;P&gt;&amp;nbsp; | lookup ACResults.csv cn as user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Final result of my new search:&lt;/P&gt;&lt;P&gt;index=Myindex host=xx.xx.xx.xx "AAA user accounting Successful"&lt;/P&gt;&lt;P&gt;| dedup user&lt;/P&gt;&lt;P&gt;| lookup ACResults.csv cn as user&lt;/P&gt;&lt;P&gt;| eval Sector=extensionAttribute14&lt;/P&gt;&lt;P&gt;| stats count by Sector&lt;/P&gt;&lt;P&gt;| sort -count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Answering your questions:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-What is the relationship between the field you tabled ("user") and all the lookup tables? -user = cn from active directory&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-And the relationship with "field_stats_wanted"? -extensionAttribute14 for that user (cn) from Active Directory&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Most importantly, why is inputlookup even considered? -all my inputlookups had the same fields, so appending would make it easier to search, (I thought), I was wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-&lt;SPAN&gt;It usually means that the problem is not clearly understood. - that was true, but I learned.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps for future users. Thank you all the same.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Nov 2023 23:30:07 GMT</pubDate>
    <dc:creator>DanWilkinson</dc:creator>
    <dc:date>2023-11-06T23:30:07Z</dc:date>
    <item>
      <title>index query results against inputlookup return stats/multiple stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/index-query-results-against-inputlookup-return-stats-multiple/m-p/667243#M228899</link>
      <description>&lt;P&gt;Hello and thank you for your time.&lt;/P&gt;&lt;P&gt;I would like to run a search in splunk, using the results against inputlookup lists to return the stats or multiple stats.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;My search is:&lt;/P&gt;&lt;P&gt;index="MyIndex" AND host="MyHost" AND (*string1* OR "*string2*" OR "*string3*") | dedup user | table user&lt;/P&gt;&lt;P&gt;user_results&lt;BR /&gt;user.name1&lt;BR /&gt;user.name2&lt;BR /&gt;user.name3&lt;/P&gt;&lt;P&gt;using those results:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;| inputlookup ACBounceList_a-c.csv&lt;BR /&gt;| inputlookup append=t ACBounceList_d-g.csv&lt;BR /&gt;| inputlookup append=t ACBounceList_h-l.csv&lt;BR /&gt;| inputlookup append=t ACBounceList_m-q.csv&lt;BR /&gt;| inputlookup append=t ACBounceList_r-s.csv&lt;BR /&gt;| inputlookup append=t ACBounceList_t-v.csv&lt;BR /&gt;| inputlookup append=t ACBounceList_w-z.csv&lt;BR /&gt;| stats count by field_stats_wanted&lt;/P&gt;&lt;P&gt;| where inputlookup_user = user_results&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;resulting in:&lt;/P&gt;&lt;P&gt;field_stats_wanted&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;count&lt;/P&gt;&lt;P&gt;value1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30&lt;/P&gt;&lt;P&gt;value2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;35&lt;/P&gt;&lt;P&gt;etc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance with this would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 22:31:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/index-query-results-against-inputlookup-return-stats-multiple/m-p/667243#M228899</guid>
      <dc:creator>DanWilkinson</dc:creator>
      <dc:date>2023-11-02T22:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: index query results against inputlookup return stats/multiple stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/index-query-results-against-inputlookup-return-stats-multiple/m-p/667275#M228915</link>
      <description>&lt;P&gt;It is unclear what is being asked. &amp;nbsp;What is the relationship between the field you tabled ("user") and all the lookup tables? &amp;nbsp;And the relationship with "field_stats_wanted"? &amp;nbsp;Most importantly, why is inputlookup even considered? &amp;nbsp;If you wonder, appending multiple inputlookups is rarely the correct approach. &amp;nbsp;It usually means that the problem is not clearly understood.&lt;/P&gt;&lt;P&gt;So, explain the use case without SPL first. &amp;nbsp;Is "user" is the only field of interest from raw events? &amp;nbsp;What is the desired results? &amp;nbsp;What are in those lookup tables? &amp;nbsp;Why are there so many different tables? Are there inherent relationships between those tables? &amp;nbsp;What is the logic between "user", these tables, and desired results? &amp;nbsp;Try not make volunteers read your mind.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 09:52:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/index-query-results-against-inputlookup-return-stats-multiple/m-p/667275#M228915</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-11-03T09:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: index query results against inputlookup return stats/multiple stats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/index-query-results-against-inputlookup-return-stats-multiple/m-p/667620#M229040</link>
      <description>&lt;P&gt;Thank you for the response. I did manage to figure out my issue. First was the use of the multiple lookups, when I created the first lookup, I used sort, that limited my results to &amp;gt; 5000, and I needed &amp;lt; 30k. I fixed that, creating the Inputlookup&amp;nbsp;ACResults.csv without the sort value that was limiting my results. (inputlookup was from Active Directory).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then used the following search:&lt;/P&gt;&lt;P&gt;&amp;nbsp; index=Myindex host=xx.xx.xx.xx "AAA user accounting Successful"&lt;/P&gt;&lt;P&gt;&amp;nbsp; | dedup user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then used lookup for where the user field values matched the field cn from my lookup:&lt;/P&gt;&lt;P&gt;&amp;nbsp; | lookup ACResults.csv cn as user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Final result of my new search:&lt;/P&gt;&lt;P&gt;index=Myindex host=xx.xx.xx.xx "AAA user accounting Successful"&lt;/P&gt;&lt;P&gt;| dedup user&lt;/P&gt;&lt;P&gt;| lookup ACResults.csv cn as user&lt;/P&gt;&lt;P&gt;| eval Sector=extensionAttribute14&lt;/P&gt;&lt;P&gt;| stats count by Sector&lt;/P&gt;&lt;P&gt;| sort -count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Answering your questions:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-What is the relationship between the field you tabled ("user") and all the lookup tables? -user = cn from active directory&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-And the relationship with "field_stats_wanted"? -extensionAttribute14 for that user (cn) from Active Directory&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- Most importantly, why is inputlookup even considered? -all my inputlookups had the same fields, so appending would make it easier to search, (I thought), I was wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-&lt;SPAN&gt;It usually means that the problem is not clearly understood. - that was true, but I learned.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps for future users. Thank you all the same.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 23:30:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/index-query-results-against-inputlookup-return-stats-multiple/m-p/667620#M229040</guid>
      <dc:creator>DanWilkinson</dc:creator>
      <dc:date>2023-11-06T23:30:07Z</dc:date>
    </item>
  </channel>
</rss>

