<?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 Search based on a previous conditions. Or alert that exec additional search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-based-on-a-previous-conditions-Or-alert-that-exec/m-p/670567#M229862</link>
    <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to implement something like this?&lt;BR /&gt;I have 300+ devices that send logs to one index. I want to check if there are no logs from the device for more than one minute then execute an alert. When the device resumed logs then also a warning. And immediately after the warning update the csv file.&lt;/P&gt;&lt;P&gt;My search now looks like this:&lt;/P&gt;&lt;P&gt;| tstats latest(_time) as lastSeen where index IN("my_devs") earliest=-2m latest=now by host&lt;BR /&gt;| lookup devs_hosts_names.csv host OUTPUT dev_name&lt;BR /&gt;| eval dev_name = if(isnotnull(dev_name),dev_name,"unknow host")&lt;BR /&gt;| eval status = if((now() - lastSeen&amp;lt;=60),"up","down")&lt;BR /&gt;| eval status = if(isnotnull(lastSeen),status,"unknow")&lt;BR /&gt;| search NOT&lt;BR /&gt;[| inputlookup devs_status.csv&lt;BR /&gt;| fields host dev_name status]&lt;BR /&gt;| convert ctime(*Seen)&lt;BR /&gt;| table host dev_name status lastSeen&lt;/P&gt;&lt;P&gt;| - At this time of search I would like to trigger an alert for each dev_name and then rewrite (update)&amp;nbsp; devs_status.csv&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't find how it can be realized, I ask for your help. I'm new to splunk and don't understand how much this kind of request is normal for splunk?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 03 Dec 2023 16:00:23 GMT</pubDate>
    <dc:creator>Kim</dc:creator>
    <dc:date>2023-12-03T16:00:23Z</dc:date>
    <item>
      <title>Search based on a previous conditions. Or alert that exec additional search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-based-on-a-previous-conditions-Or-alert-that-exec/m-p/670567#M229862</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to implement something like this?&lt;BR /&gt;I have 300+ devices that send logs to one index. I want to check if there are no logs from the device for more than one minute then execute an alert. When the device resumed logs then also a warning. And immediately after the warning update the csv file.&lt;/P&gt;&lt;P&gt;My search now looks like this:&lt;/P&gt;&lt;P&gt;| tstats latest(_time) as lastSeen where index IN("my_devs") earliest=-2m latest=now by host&lt;BR /&gt;| lookup devs_hosts_names.csv host OUTPUT dev_name&lt;BR /&gt;| eval dev_name = if(isnotnull(dev_name),dev_name,"unknow host")&lt;BR /&gt;| eval status = if((now() - lastSeen&amp;lt;=60),"up","down")&lt;BR /&gt;| eval status = if(isnotnull(lastSeen),status,"unknow")&lt;BR /&gt;| search NOT&lt;BR /&gt;[| inputlookup devs_status.csv&lt;BR /&gt;| fields host dev_name status]&lt;BR /&gt;| convert ctime(*Seen)&lt;BR /&gt;| table host dev_name status lastSeen&lt;/P&gt;&lt;P&gt;| - At this time of search I would like to trigger an alert for each dev_name and then rewrite (update)&amp;nbsp; devs_status.csv&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't find how it can be realized, I ask for your help. I'm new to splunk and don't understand how much this kind of request is normal for splunk?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2023 16:00:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-based-on-a-previous-conditions-Or-alert-that-exec/m-p/670567#M229862</guid>
      <dc:creator>Kim</dc:creator>
      <dc:date>2023-12-03T16:00:23Z</dc:date>
    </item>
  </channel>
</rss>

