<?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 a search for the dashboard to show last event from each source? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-search-for-the-dashboard-to-show-last-event-from/m-p/385706#M25267</link>
    <description>&lt;P&gt;maybe a single panel will do,&lt;BR /&gt;
try out this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats max(_time) as last_event where index=* by source
| eval last_event_human = strftime(last_event, "%c")
| eval now = now()
| eval diff_in_seconds = now - last_event
| eval alert = if(diff_in_seconds&amp;gt;10,"alert","OK")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;change the &lt;CODE&gt;index=*&lt;/CODE&gt; to your index&lt;BR /&gt;
feel free to change the alert value (here 10 seconds) to your desired value&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
    <pubDate>Sun, 17 Jun 2018 12:12:41 GMT</pubDate>
    <dc:creator>adonio</dc:creator>
    <dc:date>2018-06-17T12:12:41Z</dc:date>
    <item>
      <title>How to create a search for the dashboard to show last event from each source?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-search-for-the-dashboard-to-show-last-event-from/m-p/385705#M25266</link>
      <description>&lt;P&gt;We have an index that reads in log files from disk. Each logfile is its own source under the index, I want to create a basic health dashboard that shows the source name and when the last event/log was received and in the perfect world turn red if the last log was received more than x hours ago.&lt;/P&gt;

&lt;P&gt;I currently have this set up with a single dashboard for each source, however, I would like to try and consolidate into a single dashboard. &lt;/P&gt;

&lt;P&gt;Any help would be amazing&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jun 2018 11:51:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-search-for-the-dashboard-to-show-last-event-from/m-p/385705#M25266</guid>
      <dc:creator>ng87</dc:creator>
      <dc:date>2018-06-17T11:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search for the dashboard to show last event from each source?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-search-for-the-dashboard-to-show-last-event-from/m-p/385706#M25267</link>
      <description>&lt;P&gt;maybe a single panel will do,&lt;BR /&gt;
try out this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats max(_time) as last_event where index=* by source
| eval last_event_human = strftime(last_event, "%c")
| eval now = now()
| eval diff_in_seconds = now - last_event
| eval alert = if(diff_in_seconds&amp;gt;10,"alert","OK")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;change the &lt;CODE&gt;index=*&lt;/CODE&gt; to your index&lt;BR /&gt;
feel free to change the alert value (here 10 seconds) to your desired value&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jun 2018 12:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-search-for-the-dashboard-to-show-last-event-from/m-p/385706#M25267</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-06-17T12:12:41Z</dc:date>
    </item>
  </channel>
</rss>

