<?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 get a report on latency between Heavy Forwarder and Indexer? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314607#M58894</link>
    <description>&lt;P&gt;In our environment, we have syslog servers that send data to regional Heavy forwarders. The data in HFs eventually gets indexed and is searchable on Search Heads.&lt;/P&gt;

&lt;P&gt;The issue now is, we are able to see data(logs) on HFs. But we are not able to see them on Search Heads.&lt;/P&gt;

&lt;P&gt;Eg : The last log present on HF for a particular host is on 30th May. But the last log we can see on our Search Head for the same host will be of 27th or 28th May's. We will be able to see 30th logs, somewhere around June 1st or 2nd.&lt;/P&gt;

&lt;P&gt;It is obvious there is some latency between HF and Indexer. It is mostly because of the bandwidth issues (confirmed).&lt;/P&gt;

&lt;P&gt;But I would like to get a report from Splunk that gives us the time difference between the moment a log got into HF and the moment it got indexed. Is there any SPL for getting this report?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 30 May 2017 14:54:34 GMT</pubDate>
    <dc:creator>bharadwaja30</dc:creator>
    <dc:date>2017-05-30T14:54:34Z</dc:date>
    <item>
      <title>How to get a report on latency between Heavy Forwarder and Indexer?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314607#M58894</link>
      <description>&lt;P&gt;In our environment, we have syslog servers that send data to regional Heavy forwarders. The data in HFs eventually gets indexed and is searchable on Search Heads.&lt;/P&gt;

&lt;P&gt;The issue now is, we are able to see data(logs) on HFs. But we are not able to see them on Search Heads.&lt;/P&gt;

&lt;P&gt;Eg : The last log present on HF for a particular host is on 30th May. But the last log we can see on our Search Head for the same host will be of 27th or 28th May's. We will be able to see 30th logs, somewhere around June 1st or 2nd.&lt;/P&gt;

&lt;P&gt;It is obvious there is some latency between HF and Indexer. It is mostly because of the bandwidth issues (confirmed).&lt;/P&gt;

&lt;P&gt;But I would like to get a report from Splunk that gives us the time difference between the moment a log got into HF and the moment it got indexed. Is there any SPL for getting this report?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 14:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314607#M58894</guid>
      <dc:creator>bharadwaja30</dc:creator>
      <dc:date>2017-05-30T14:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a report on latency between Heavy Forwarder and Indexer?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314608#M58895</link>
      <description>&lt;P&gt;Assuming that there is little-to-no latency in the arrival of the event at the HF (e.g. the timestamp in the event is very close to the time that it arrives at the HV), then you can chart &lt;CODE&gt;_indextime - _time&lt;/CODE&gt;.  So you can do something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval latencySeconds = _indextime - _time | timechart max(latencySeconds) avg(latencySeconds) BY sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can change &lt;CODE&gt;sourcetype&lt;/CODE&gt; to &lt;CODE&gt;splunk_server&lt;/CODE&gt;, or &lt;CODE&gt;host&lt;/CODE&gt; or whatever to research the dependant variable.  You might also check out the &lt;CODE&gt;Meta Woot!&lt;/CODE&gt; app that does some of this, too:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/2949/"&gt;https://splunkbase.splunk.com/app/2949/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2017 16:46:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314608#M58895</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-30T16:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a report on latency between Heavy Forwarder and Indexer?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314609#M58896</link>
      <description>&lt;P&gt;Thank you woodcock for helping me out with the SPL &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 08:06:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314609#M58896</guid>
      <dc:creator>bharadwaja30</dc:creator>
      <dc:date>2017-05-31T08:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a report on latency between Heavy Forwarder and Indexer?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314610#M58897</link>
      <description>&lt;P&gt;Hi Woodcock,&lt;/P&gt;

&lt;P&gt;Here we are going with an assumption that there is little or no latency in the arrival of event at HF. Is there a way we can get that latency too?? &lt;/P&gt;

&lt;P&gt;So in a picture format it will be..&lt;/P&gt;

&lt;P&gt;Endpoint (event generated) Time T1, Heavy Forwarder (the same event reached HF) Time T2, Indexer (when that same event was indexed) Time T3.&lt;/P&gt;

&lt;P&gt;So what we need is &lt;BR /&gt;
T2 – T1 =  time taken to reach HF&lt;BR /&gt;
T3 – T2 = time taken to get the event indexed &lt;BR /&gt;
T3 – T1 = total time taken for the event to be usable.&lt;/P&gt;

&lt;P&gt;When we get the above information for each endpoint (only sample) we will be able to get to the bottom of the problem.&lt;/P&gt;

&lt;P&gt;Then we have to go and dig deeper to find out if where the problem is:&lt;BR /&gt;
1.  HF is retransmitting or&lt;BR /&gt;
2.  indexer queues are full or&lt;BR /&gt;
3.  we are running out CPU or &lt;BR /&gt;
4.  we are wasting time on reading and writing from the disks on the HF &lt;/P&gt;

&lt;P&gt;Thanks for your help in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 06:27:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314610#M58897</guid>
      <dc:creator>bharadwaja30</dc:creator>
      <dc:date>2017-06-02T06:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a report on latency between Heavy Forwarder and Indexer?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314611#M58898</link>
      <description>&lt;P&gt;It would be best to ask a new question for this.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 14:03:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314611#M58898</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-02T14:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a report on latency between Heavy Forwarder and Indexer?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314612#M58899</link>
      <description>&lt;P&gt;There are some other (and some better) ways to search this out.  In addition to the accepted answer above, try these searches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count  where index=* by index sourcetype source _time _indextime 
| eval latencySeconds =_indextime - _time
| stats avg(latencySeconds) AS latencySeconds BY index sourcetype source
| where latencySeconds &amp;lt; 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats min(_time) AS early max(_time) AS late
WHERE index=*
BY host
| eval diff = late - early
| where early != late
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Of course, Martin Mueller always has a much faster way to gauge Indexing lag:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/232475/how-to-search-when-an-event-was-indexed.html"&gt;https://answers.splunk.com/answers/232475/how-to-search-when-an-event-was-indexed.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;At the very bottom - the key is to reduce cardinality of _time and only look for the worst case per bucket so to quickly get a general overview of your indexing delay, consider something tstatsy like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats max(_indextime) as max where index=foo by host _time span=1s
| eval delta = max - _time
| timechart max(delta) by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It introduces half a span of error if you want averages, but great to detect peaks.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 01:21:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/314612#M58899</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-01-10T01:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a report on latency between Heavy Forwarder and Indexer?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/564979#M100553</link>
      <description>&lt;P&gt;Hi Woodcook,&lt;/P&gt;&lt;P&gt;Can I ask why you never really answered the core question in stead of asking him to add a new question?&lt;/P&gt;&lt;P&gt;His question was super relevant.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 07:25:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-a-report-on-latency-between-Heavy-Forwarder-and/m-p/564979#M100553</guid>
      <dc:creator>BDein</dc:creator>
      <dc:date>2021-08-27T07:25:48Z</dc:date>
    </item>
  </channel>
</rss>

