<?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 if index have no data in the last 24 hours? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/625995#M217588</link>
    <description>&lt;P&gt;Thank you for your response. The problem is that I have several indexes which have not received any information in the last month. When I use this command, I get absolutely nothing. My purpose is to create a list of those indexes that have not received any information in the last 24 hours.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2023 12:09:59 GMT</pubDate>
    <dc:creator>Neonbeeflash</dc:creator>
    <dc:date>2023-01-05T12:09:59Z</dc:date>
    <item>
      <title>How to create an alert if index have no data in the last 24 hours?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/623565#M216768</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I want to create alert to check on all indexes event count and alert the list of&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;all indexes&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;that have no events in the last 24 hours.&lt;BR /&gt;&lt;BR /&gt;I saw a post with the same problem,&amp;nbsp;but it didn't help.&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/480781" target="_blank" rel="noopener"&gt;How to create an alert if index have no data in th... - Splunk Community&lt;/A&gt;.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The following search doesn't work for my purpose.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;| tstats count where index=* by index | where count = 0&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 12:49:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/623565#M216768</guid>
      <dc:creator>Neonbeeflash</dc:creator>
      <dc:date>2022-12-07T12:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert if index have no data in the last 24 hours?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/623580#M216771</link>
      <description>&lt;P&gt;Please elaborate on "doesn't work for my purpose".&lt;/P&gt;&lt;P&gt;Have you looked at the blog entry referenced in linked answer?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 13:52:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/623580#M216771</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-12-07T13:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert if index have no data in the last 24 hours?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/625995#M217588</link>
      <description>&lt;P&gt;Thank you for your response. The problem is that I have several indexes which have not received any information in the last month. When I use this command, I get absolutely nothing. My purpose is to create a list of those indexes that have not received any information in the last 24 hours.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 12:09:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/625995#M217588</guid>
      <dc:creator>Neonbeeflash</dc:creator>
      <dc:date>2023-01-05T12:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert if index have no data in the last 24 hours?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/626025#M217593</link>
      <description>&lt;P&gt;I think you're getting no results because there's nothing for Splunk to find in empty indexes.&amp;nbsp; Try this alternative query.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=* by index
```Get a list of all indexes and assign them a count of zero```
| append [|rest /services/data/indexes 
  | dedup title 
  | fields title 
  ```Discard internal indexes```
  | search title!="_*" 
  | rename title as index 
  | eval count=0
]
```Merge results, keeping the copy with a non-zero, if present```
| stats max(count) as count by index
| where count==0&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 05 Jan 2023 16:06:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/626025#M217593</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-01-05T16:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an alert if index have no data in the last 24 hours?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/626959#M217885</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;This worked amazing! Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 17:29:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-alert-if-index-have-no-data-in-the-last-24/m-p/626959#M217885</guid>
      <dc:creator>Neonbeeflash</dc:creator>
      <dc:date>2023-01-12T17:29:54Z</dc:date>
    </item>
  </channel>
</rss>

