<?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 sort source based on its earliest event indexing? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-source-based-on-its-earliest-event-indexing/m-p/309197#M92733</link>
    <description>&lt;P&gt;Hi devd25,&lt;BR /&gt;
it's strange! this means that you have logs only from the listed hosts, if you're waiting for logs from all your hosts probably there's a problem in ingestion or maybe some logs arrive only in certain time periods different from the ones you used in your search.&lt;/P&gt;

&lt;P&gt;You can list all connected hosts using the same search with Splunk internal logs:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| stats earliest(_time) AS earliest count by source host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Check if the result of this search is different from the previous, so you can know the host to verify in detail.&lt;/P&gt;

&lt;P&gt;One of the usual alert is just the perimeter check, creating a lookup with all the hosts (Perimeter.csv with one coluimn called host) to monitor and running every 5 minutes a search like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| eval host=upper(host)
| stats  count by host
| append [ | inputlookup perimeter.csv | eval host=upper(host), count=0 | fields host ]
| stats sum(count) AS Total by host
| where Total=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if there are results to this search there's a connection problem for the resulted hosts.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2017 06:54:30 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-10-18T06:54:30Z</dc:date>
    <item>
      <title>How to sort source based on its earliest event indexing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-source-based-on-its-earliest-event-indexing/m-p/309194#M92730</link>
      <description>&lt;P&gt;I am in the log sources provisioning phase. &lt;/P&gt;

&lt;P&gt;I examine the "data summary" frequently to see the change in number of hosts/sources/sourcetypes to determine from which log sources, Splunk has started collecting/receving data&lt;/P&gt;

&lt;P&gt;However, now I have noticed jump in number of sources but same number of hosts and sourcetypes. Hence, I want to be able to find out which was that new source that has newly emerged in Splunk.&lt;/P&gt;

&lt;P&gt;In order to do this, I am looking for a search command that will give me a list of all sources with it's first event displayed which, I guess, can be achieved by using the earliest event command.&lt;/P&gt;

&lt;P&gt;Can someone please advise how I can achieve this ? &lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 07:42:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-source-based-on-its-earliest-event-indexing/m-p/309194#M92730</guid>
      <dc:creator>devd25</dc:creator>
      <dc:date>2017-10-17T07:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort source based on its earliest event indexing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-source-based-on-its-earliest-event-indexing/m-p/309195#M92731</link>
      <description>&lt;P&gt;Hi devd25,&lt;BR /&gt;
try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=*
| stats earliest(_time) AS earliest count by source host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to have, for each host and source the first event timestamp and the count of events.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 08:45:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-source-based-on-its-earliest-event-indexing/m-p/309195#M92731</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-10-17T08:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort source based on its earliest event indexing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-source-based-on-its-earliest-event-indexing/m-p/309196#M92732</link>
      <description>&lt;P&gt;Hi @cusello,&lt;/P&gt;

&lt;P&gt;Thanks for that.  I applied that command but it only showed limited hosts, not all of them.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 03:02:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-source-based-on-its-earliest-event-indexing/m-p/309196#M92732</guid>
      <dc:creator>devd25</dc:creator>
      <dc:date>2017-10-18T03:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort source based on its earliest event indexing?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-source-based-on-its-earliest-event-indexing/m-p/309197#M92733</link>
      <description>&lt;P&gt;Hi devd25,&lt;BR /&gt;
it's strange! this means that you have logs only from the listed hosts, if you're waiting for logs from all your hosts probably there's a problem in ingestion or maybe some logs arrive only in certain time periods different from the ones you used in your search.&lt;/P&gt;

&lt;P&gt;You can list all connected hosts using the same search with Splunk internal logs:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| stats earliest(_time) AS earliest count by source host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Check if the result of this search is different from the previous, so you can know the host to verify in detail.&lt;/P&gt;

&lt;P&gt;One of the usual alert is just the perimeter check, creating a lookup with all the hosts (Perimeter.csv with one coluimn called host) to monitor and running every 5 minutes a search like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| eval host=upper(host)
| stats  count by host
| append [ | inputlookup perimeter.csv | eval host=upper(host), count=0 | fields host ]
| stats sum(count) AS Total by host
| where Total=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if there are results to this search there's a connection problem for the resulted hosts.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 06:54:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-source-based-on-its-earliest-event-indexing/m-p/309197#M92733</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-10-18T06:54:30Z</dc:date>
    </item>
  </channel>
</rss>

