<?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: Lookup file question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-file-question/m-p/602104#M209579</link>
    <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[|inputlookup file.csv
| rename Index as index
| rename ErrorKey as query
| fields index query
| format]&lt;/LI-CODE&gt;&lt;P&gt;You may need to remove some double quotes&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2022 15:09:17 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-06-16T15:09:17Z</dc:date>
    <item>
      <title>Lookup file question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-file-question/m-p/602086#M209568</link>
      <description>&lt;P&gt;I am wanting to use a lookup file to drive search for an alert.&amp;nbsp; This seems a bit unique as I am not wanting to use event data from results to drive the lookup, but rather have all the lookup entries dynamically added to the search itself. Below is the example use-case:&lt;BR /&gt;&lt;BR /&gt;CSV file example:&lt;BR /&gt;Index, ErrorKey&lt;BR /&gt;"index1","Error string 1"&lt;BR /&gt;"index1","Error string 2"&lt;BR /&gt;"index2","Error string 3"&lt;BR /&gt;&lt;BR /&gt;Looking to use it to scale a search like this:&lt;BR /&gt;&lt;BR /&gt;index=index1 OR index=index 2 ("Error string 1" OR "Error string 2" OR "Error string 3")&lt;BR /&gt;&lt;BR /&gt;Basically the index/error string combo could be managed in the csv file as opposed to the alert search itself. Making it easier to add/scale/maintain the search criteria. Is this possible?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 13:52:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-file-question/m-p/602086#M209568</guid>
      <dc:creator>yooitsgreg</dc:creator>
      <dc:date>2022-06-16T13:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup file question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-file-question/m-p/602095#M209574</link>
      <description>&lt;P&gt;It is not clear what your requirement is - from&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Index, ErrorKey&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;"index1","Error string 1"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"index1","Error string 2"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"index2","Error string 3"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;do you want &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(index=index1 AND ErrorKey="Error string 1") OR (index=index1 AND ErrorKey="Error string 2") OR (index=index2 AND ErrorKey="Error string 3") - three combinations&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(index=index1 AND ErrorKey="Error string 1") OR (index=index1 AND ErrorKey="Error string 2") OR (index=index1 AND ErrorKey="Error string 3") OR&amp;nbsp;(index=index2 AND ErrorKey="Error string 1") OR (index=index2 AND ErrorKey="Error string 2") OR (index=index2 AND ErrorKey="Error string 3") - six combinations&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The first version maintains the combinations from the csv file, whereas the second version is closer to your "expanded" search&lt;/P&gt;&lt;P&gt;Also, instead of searching for the ErrorKey field in your events being equal to the string from the csv file, do you want to search for the string anywhere in the raw event (as your expanded search seems to suggest)?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 14:20:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-file-question/m-p/602095#M209574</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-16T14:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup file question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-file-question/m-p/602097#M209575</link>
      <description>&lt;P&gt;Sorry for the confusion. Option 1 I believe is what I am looking for with the 3 combinations:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(index=index1 AND ErrorKey="Error string 1") OR (index=index1 AND ErrorKey="Error string 2") OR (index=index2 AND ErrorKey="Error string 3")&lt;BR /&gt;&lt;BR /&gt;I am wanting to search for the string anywhere in the raw event. ErrorKey is not a field value in the events and not possible to create this field as the error string in the result data is not standardized.&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;Thank you for your reply&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 14:25:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-file-question/m-p/602097#M209575</guid>
      <dc:creator>yooitsgreg</dc:creator>
      <dc:date>2022-06-16T14:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup file question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-file-question/m-p/602104#M209579</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[|inputlookup file.csv
| rename Index as index
| rename ErrorKey as query
| fields index query
| format]&lt;/LI-CODE&gt;&lt;P&gt;You may need to remove some double quotes&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 15:09:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-file-question/m-p/602104#M209579</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-16T15:09:17Z</dc:date>
    </item>
  </channel>
</rss>

