<?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 check if new hosts get added to instance &amp; get alerted? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-check-if-new-hosts-get-added-to-instance-get-alerted/m-p/200320#M58064</link>
    <description>&lt;P&gt;The number to hosts have increased in our instance &amp;amp; we want to check which ones are the new ones added. Also we want to get alerted on a weekly basis if a new host gets added. Can anyone let me know the query to check the newly added hosts?&lt;/P&gt;

&lt;P&gt;Thanks in Advance.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Sep 2016 09:54:26 GMT</pubDate>
    <dc:creator>abhijit_mhatre</dc:creator>
    <dc:date>2016-09-19T09:54:26Z</dc:date>
    <item>
      <title>How to check if new hosts get added to instance &amp; get alerted?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-check-if-new-hosts-get-added-to-instance-get-alerted/m-p/200320#M58064</link>
      <description>&lt;P&gt;The number to hosts have increased in our instance &amp;amp; we want to check which ones are the new ones added. Also we want to get alerted on a weekly basis if a new host gets added. Can anyone let me know the query to check the newly added hosts?&lt;/P&gt;

&lt;P&gt;Thanks in Advance.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 09:54:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-check-if-new-hosts-get-added-to-instance-get-alerted/m-p/200320#M58064</guid>
      <dc:creator>abhijit_mhatre</dc:creator>
      <dc:date>2016-09-19T09:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if new hosts get added to instance &amp; get alerted?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-check-if-new-hosts-get-added-to-instance-get-alerted/m-p/200321#M58065</link>
      <description>&lt;P&gt;i am not sure if there is any direct way available for this one..  but, we can find out the first message from a host and approximately, we can assume that date as the host added date. &lt;BR /&gt;
i am querying only head 100 hosts(oldest 100 hosts).. we can use tail 100 to get most recent 100 hosts. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=hosts | head 100
 | fields host firstTime lastTime totalCount
 | sort -totalCount
 | fieldformat firstTime=strftime(firstTime,"%x %X")
 | fieldformat lastTime=strftime(lastTime,"%x %X")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Sep 2016 10:17:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-check-if-new-hosts-get-added-to-instance-get-alerted/m-p/200321#M58065</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-09-19T10:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if new hosts get added to instance &amp; get alerted?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-check-if-new-hosts-get-added-to-instance-get-alerted/m-p/200322#M58066</link>
      <description>&lt;P&gt;Hi  abhijit, if you want to query date wise, lets say, new hosts added last week, then - &lt;BR /&gt;
tested and working fine..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | metadata type=hosts |eval SevenDaysBack = relative_time(now(), "-7d@d") 
 | where firstTime &amp;gt; SevenDaysBack 
 | eval hostAdded=strftime(firstTime, "%d-%m-%Y %H:%M") 
 | table host, hostAdded | sort hostAdded 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1869iA640140D29D41B2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 11:06:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-check-if-new-hosts-get-added-to-instance-get-alerted/m-p/200322#M58066</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-09-21T11:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if new hosts get added to instance &amp; get alerted?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-check-if-new-hosts-get-added-to-instance-get-alerted/m-p/200323#M58067</link>
      <description>&lt;P&gt;Thanks @inventsekar for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 13:16:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-check-if-new-hosts-get-added-to-instance-get-alerted/m-p/200323#M58067</guid>
      <dc:creator>abhijit_mhatre</dc:creator>
      <dc:date>2016-09-21T13:16:36Z</dc:date>
    </item>
  </channel>
</rss>

