<?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: indexes not passing data alerts in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519720#M87875</link>
    <description>&lt;P&gt;this search would need to reside on the indexer ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Sep 2020 14:39:13 GMT</pubDate>
    <dc:creator>splunkyboy</dc:creator>
    <dc:date>2020-09-15T14:39:13Z</dc:date>
    <item>
      <title>indexes not passing data alerts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519692#M87869</link>
      <description>&lt;P&gt;im trying to set up an alert that will mail me when one of my indexes hasn't passed any data for the last 3 hours, and make it part of a dashboard&lt;/P&gt;&lt;P&gt;does anyone have a search string that will do this please&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 13:33:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519692#M87869</guid>
      <dc:creator>splunkyboy</dc:creator>
      <dc:date>2020-09-15T13:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: indexes not passing data alerts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519701#M87871</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You should take a look at 'metasearch' command.&lt;/P&gt;&lt;P&gt;The query below may help you to check if your indexes have received any data or not:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| metasearch index=INDEX 
| stats count 
| appendpipe 
    [ stats count 
    | where count=0]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 14:05:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519701#M87871</guid>
      <dc:creator>alonsocaio</dc:creator>
      <dc:date>2020-09-15T14:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: indexes not passing data alerts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519707#M87872</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;That search gives me a count of all the indexes with data still, although with"&amp;nbsp; where count =0"&amp;nbsp; i cant work out why&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 14:23:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519707#M87872</guid>
      <dc:creator>splunkyboy</dc:creator>
      <dc:date>2020-09-15T14:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: indexes not passing data alerts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519718#M87874</link>
      <description>&lt;P&gt;Actually, in this case, the 'appendpipe' is used to set a count=0 when there is no result returned by your query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, this query will probably work better when you specify only one index.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 14:36:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519718#M87874</guid>
      <dc:creator>alonsocaio</dc:creator>
      <dc:date>2020-09-15T14:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: indexes not passing data alerts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519720#M87875</link>
      <description>&lt;P&gt;this search would need to reside on the indexer ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 14:39:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519720#M87875</guid>
      <dc:creator>splunkyboy</dc:creator>
      <dc:date>2020-09-15T14:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: indexes not passing data alerts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519721#M87876</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226307"&gt;@splunkyboy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;to have an alert when an index doesn't receive data, you have at first create a lookup that contains the list of indexes to monitor (called e.g. indexes.csv) with at least one column (index).&lt;/P&gt;&lt;P&gt;Then you have to run a search like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| metasearch index=*
| stats count BY index
| append [ | inputlookup indexes.csv | eval count=0 | fields index count ]
| stats sum(count) AS total BY index&lt;/LI-CODE&gt;&lt;P&gt;in this way you have the list of all your indexes:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;if total&amp;gt;0 they received logs,&lt;/LI&gt;&lt;LI&gt;if total=0 they didn't receive logs.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Now you can create an alert for the missing indexes adding at the end of the search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where total=0&lt;/LI-CODE&gt;&lt;P&gt;if instead you add at the end:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Status=if(total="0","Missing","Present")
| table index Status&lt;/LI-CODE&gt;&lt;P&gt;you have a search to put in a dashboard panel that can display (also in graphic mode) the situation or in a time distribution.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 14:39:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519721#M87876</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-15T14:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: indexes not passing data alerts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519729#M87878</link>
      <description>&lt;P&gt;No, You could run the search on your Search Head.&lt;/P&gt;&lt;P&gt;But I totally agree with the solution provided by&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;. The lookup could help you out when checking more than one index.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 14:49:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/519729#M87878</guid>
      <dc:creator>alonsocaio</dc:creator>
      <dc:date>2020-09-15T14:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: indexes not passing data alerts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/565850#M100649</link>
      <description>&lt;P&gt;I know this is a bit of an old thread but your search helped me come up with something similar. I've been looking for what seems like days to find a solution. I ended up going with tstats and using the date for when the last log was found within the lookback window.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats latest(_time) as lastTime where index=* by index
| append [ 
    | rest /services/data/indexes 
    | dedup title 
    | rename title as index 
    | eval lastTime=0 
    | fields index lastTime
  ]
| search NOT index IN ("_*", test)
| convert ctime("lastTime")  
| stats max(lastTime) as lastTime by index&lt;/LI-CODE&gt;&lt;P&gt;I used&amp;nbsp;&lt;STRONG&gt;| rest /services/data/indexes &lt;/STRONG&gt;but one can easily swap that with a lookup like you have in your example.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It will list out all the indexes and provides a date stamp of the last known log entry. The caveat is that the the last known log, is only known if there is an event that falls within the lookback period. However, this is still good because we can see all the indexes except those omitted as part of the filter.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hopefully this is also helpful to someone.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 18:15:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/565850#M100649</guid>
      <dc:creator>BrandonKeep</dc:creator>
      <dc:date>2021-09-03T18:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: indexes not passing data alerts</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/565894#M100650</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226307"&gt;@splunkyboy&lt;/a&gt; and all,&lt;/P&gt;&lt;P&gt;Yes the solution with rest requires less maintenance.&lt;/P&gt;&lt;P&gt;If one of the answers to this question solves your need, please, accept it for the other people of Community, otherwise, please tell us how we can help you.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Sep 2021 09:03:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/indexes-not-passing-data-alerts/m-p/565894#M100650</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-09-04T09:03:41Z</dc:date>
    </item>
  </channel>
</rss>

