<?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: How to create an alert based on lookup file in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-based-on-lookup-file/m-p/589379#M205238</link>
    <description>&lt;P&gt;You mean something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc sourcetype=bcd “abc” 
[| inputlookup &amp;lt;lookup-name&amp;gt; | where latest==now() 
| appendpipe [| stats count | where count=0 | eval File_Name="when no match found in the lookup", earliest=0, latest=0]
 | table File_Name, earliest, latest ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;appendpipe&lt;/STRONG&gt; is the condition when nothing in the lookup matches the current time. If you can update that part as you wish in that case.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Mar 2022 17:02:55 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2022-03-16T17:02:55Z</dc:date>
    <item>
      <title>How to create an alert based on lookup file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-based-on-lookup-file/m-p/589371#M205233</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to set up an alert with the query like below.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=abc sourcetype=bcd “abc” File_name=maple.txt earliest=2h@h latest=now&lt;/LI-CODE&gt;
&lt;P&gt;In the above query,the File_name,earliest &amp;amp; latest time has to be picked up from the lookup file.&lt;BR /&gt;Condition - if the current time matches with latest time in the lookup file,then the query has to be run for the respective File_name for that timerange(earliest and latest time mentioned in the lookup)&lt;/P&gt;
&lt;P&gt;The lookup table to be like below:&lt;/P&gt;
&lt;P&gt;File_name earliest latest&lt;BR /&gt;Dfg.txt 2 4&lt;BR /&gt;Dft.txt 5 6&lt;BR /&gt;Ser.txt 5 7&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 16:32:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-based-on-lookup-file/m-p/589371#M205233</guid>
      <dc:creator>prettysunshinez</dc:creator>
      <dc:date>2022-03-16T16:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert based on lookup file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-based-on-lookup-file/m-p/589374#M205235</link>
      <description>&lt;P&gt;How is this different to what you asked a couple of weeks ago, for which I provided an answer?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 16:40:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-based-on-lookup-file/m-p/589374#M205235</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-03-16T16:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert based on lookup file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-based-on-lookup-file/m-p/589379#M205238</link>
      <description>&lt;P&gt;You mean something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc sourcetype=bcd “abc” 
[| inputlookup &amp;lt;lookup-name&amp;gt; | where latest==now() 
| appendpipe [| stats count | where count=0 | eval File_Name="when no match found in the lookup", earliest=0, latest=0]
 | table File_Name, earliest, latest ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;appendpipe&lt;/STRONG&gt; is the condition when nothing in the lookup matches the current time. If you can update that part as you wish in that case.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 17:02:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-based-on-lookup-file/m-p/589379#M205238</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-03-16T17:02:55Z</dc:date>
    </item>
  </channel>
</rss>

