<?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 How to generate an alert when a sourcetype stops sending logs? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-an-alert-when-a-sourcetype-stops-sending-logs/m-p/244900#M72955</link>
    <description>&lt;P&gt;I've found quite a few articles on how to alert on a specific source/sourcetype, but I want to alert of any sourcetype that hasn't had any log data for over 24 hours. Is there a way to create an alert for when the sourcetype reaches that 24 hour threshold? Here's the search I'm running currently with the timepicker set to Relative:24 hrs&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=sourcetypes index=*
| convert ctime(lastTime) as Last_Time timeformat="%Y/%m/%d %H:%M"
| search sourcetype!=*too_small 
| where lastTime &amp;lt; (now() - 86400) 
| fields sourcetype Last_Time
| sort -Last_Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 20 Jan 2017 15:56:08 GMT</pubDate>
    <dc:creator>nicholas_bergma</dc:creator>
    <dc:date>2017-01-20T15:56:08Z</dc:date>
    <item>
      <title>How to generate an alert when a sourcetype stops sending logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-an-alert-when-a-sourcetype-stops-sending-logs/m-p/244900#M72955</link>
      <description>&lt;P&gt;I've found quite a few articles on how to alert on a specific source/sourcetype, but I want to alert of any sourcetype that hasn't had any log data for over 24 hours. Is there a way to create an alert for when the sourcetype reaches that 24 hour threshold? Here's the search I'm running currently with the timepicker set to Relative:24 hrs&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=sourcetypes index=*
| convert ctime(lastTime) as Last_Time timeformat="%Y/%m/%d %H:%M"
| search sourcetype!=*too_small 
| where lastTime &amp;lt; (now() - 86400) 
| fields sourcetype Last_Time
| sort -Last_Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jan 2017 15:56:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-an-alert-when-a-sourcetype-stops-sending-logs/m-p/244900#M72955</guid>
      <dc:creator>nicholas_bergma</dc:creator>
      <dc:date>2017-01-20T15:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate an alert when a sourcetype stops sending logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-an-alert-when-a-sourcetype-stops-sending-logs/m-p/244901#M72956</link>
      <description>&lt;P&gt;Try like this (Time Range Picker should be more than 24Hrs so that you include the last event from that sourcetype and compare against your criteria). Just changed to order of statements as well.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=sourcetypes index=*
| search sourcetype!=*too_small 
| where lastTime &amp;lt; (now() - 86400) 
| convert ctime(lastTime) as Last_Time timeformat="%Y/%m/%d %H:%M"
| fields sourcetype Last_Time
| sort -Last_Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jan 2017 16:49:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-an-alert-when-a-sourcetype-stops-sending-logs/m-p/244901#M72956</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-20T16:49:01Z</dc:date>
    </item>
  </channel>
</rss>

