<?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 write a search and set up an alert using the metadata command to find hosts that are not reporting in? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190931#M11920</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|metadata type=hosts | table host lastTime | where lastTime&amp;lt;relative_time(now(),"-1d@d") AND lastTime&amp;gt;relative_time(now(),"-30d@d") | convert timeformat="%Y%m%d" ctime(lastTime) AS LastTime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 31 Oct 2014 16:17:44 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-10-31T16:17:44Z</dc:date>
    <item>
      <title>How to write a search and set up an alert using the metadata command to find hosts that are not reporting in?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190929#M11918</link>
      <description>&lt;P&gt;I can do this search &lt;CODE&gt;| metadata type=hosts | convert timeformat="%m/%d/%Y - %H:%M:%S" ctime(*Time)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This will give me the date fields of first, last and recent Time.&lt;/P&gt;

&lt;P&gt;I want to Pipe to an if statement to see if the recent or last time is between yesterday and 14 days ago and report on only those servers.&lt;/P&gt;

&lt;P&gt;If a server has not been reporting in 14 days it is most likely off the network for good.&lt;/P&gt;

&lt;P&gt;How do I correct the syntax for &lt;CODE&gt;| eval not_reporting=case(lastTime&amp;gt;yesterday, alert, lastTime&amp;lt;30days_ago, alert)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Any help with syntax would be great.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2014 15:35:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190929#M11918</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2014-10-31T15:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search and set up an alert using the metadata command to find hosts that are not reporting in?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190930#M11919</link>
      <description>&lt;P&gt;I can do this type of search but how do I make the search dates dynamic&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| metadata type=hosts | convert timeformat="%Y%m%d" ctime(lastTime) AS LastTime | table host LastTime | where LastTime&amp;lt;20141030 AND LastTime&amp;gt;20140930&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2014 15:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190930#M11919</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2014-10-31T15:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search and set up an alert using the metadata command to find hosts that are not reporting in?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190931#M11920</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|metadata type=hosts | table host lastTime | where lastTime&amp;lt;relative_time(now(),"-1d@d") AND lastTime&amp;gt;relative_time(now(),"-30d@d") | convert timeformat="%Y%m%d" ctime(lastTime) AS LastTime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Oct 2014 16:17:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190931#M11920</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-10-31T16:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search and set up an alert using the metadata command to find hosts that are not reporting in?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190932#M11921</link>
      <description>&lt;P&gt;This works great, Thanks much for the help&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2014 16:39:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190932#M11921</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2014-10-31T16:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search and set up an alert using the metadata command to find hosts that are not reporting in?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190933#M11922</link>
      <description>&lt;P&gt;This is not working for me &lt;BR /&gt;
 |metadata type=hosts | table host lastTime | where lastTimerelative_time(now(),"-30d@d") | convert timeformat="%Y%m%d" ctime(lastTime) AS LastTime&lt;/P&gt;</description>
      <pubDate>Mon, 15 Dec 2014 21:11:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190933#M11922</guid>
      <dc:creator>brod_geico</dc:creator>
      <dc:date>2014-12-15T21:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search and set up an alert using the metadata command to find hosts that are not reporting in?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190934#M11923</link>
      <description>&lt;P&gt;You are missing &lt;CODE&gt;&amp;lt;&lt;/CODE&gt; and &lt;CODE&gt;&amp;gt;&lt;/CODE&gt; characters and merging 2 existing field names into garbage ones.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 03:54:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/190934#M11923</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-05-23T03:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search and set up an alert using the metadata command to find hosts that are not reporting in?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/511226#M34059</link>
      <description>&lt;P&gt;Hi! I’m using metadata to report the missing logs in splunk. I’m giving a eval condition as&amp;nbsp;&lt;/P&gt;&lt;P&gt;eval reporting = case(isnull(lastTime), “no”,1=1, “yes”)..&lt;/P&gt;&lt;P&gt;so where ever there is “no”, &amp;nbsp;I’m counting those hosts and reporting. I want to know if there is any dynamic way of passing time to the query since the above mentioned logic isn’t working for me.&lt;/P&gt;&lt;P&gt;Thanks In advance.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 20:47:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-write-a-search-and-set-up-an-alert-using-the-metadata/m-p/511226#M34059</guid>
      <dc:creator>revanthammineni</dc:creator>
      <dc:date>2020-07-27T20:47:20Z</dc:date>
    </item>
  </channel>
</rss>

