<?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 Update lookup file values dynamically in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Update-lookup-file-values-dynamically/m-p/660992#M228209</link>
    <description>&lt;P&gt;I have a lookup file.&amp;nbsp; Lookup has "host", "count", "first_event" and "last_event" fields.&amp;nbsp; I want to run a search hourly that will update all the fields with fresh values and in the event that a "host" is not found in the search send an alert.&lt;/P&gt;&lt;P&gt;Any guidance would be appreciated.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Oct 2023 11:04:28 GMT</pubDate>
    <dc:creator>bt149</dc:creator>
    <dc:date>2023-10-17T11:04:28Z</dc:date>
    <item>
      <title>Update lookup file values dynamically</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Update-lookup-file-values-dynamically/m-p/660992#M228209</link>
      <description>&lt;P&gt;I have a lookup file.&amp;nbsp; Lookup has "host", "count", "first_event" and "last_event" fields.&amp;nbsp; I want to run a search hourly that will update all the fields with fresh values and in the event that a "host" is not found in the search send an alert.&lt;/P&gt;&lt;P&gt;Any guidance would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 11:04:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Update-lookup-file-values-dynamically/m-p/660992#M228209</guid>
      <dc:creator>bt149</dc:creator>
      <dc:date>2023-10-17T11:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Update lookup file values dynamically</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Update-lookup-file-values-dynamically/m-p/660993#M228210</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242392"&gt;@bt149&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;for the lookup population search you could try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| stats 
   count
   earliest(_time) AS first_event
   latest(_time) AS last_event
   BY host
| outputlookup your_lookup.csv&lt;/LI-CODE&gt;&lt;P&gt;for the alert the fires eventual missing hosts, you could try:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| stats 
   count
   BY host
| append [ | your_lookup | eval count=0 | fields host count]
| stats 
   sum(count) AS count
   BY host
| where count=0&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 11:13:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Update-lookup-file-values-dynamically/m-p/660993#M228210</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-17T11:13:21Z</dc:date>
    </item>
  </channel>
</rss>

