<?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 do I tell if a forwarder is down? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10408#M350</link>
    <description>&lt;P&gt;If you have deployed a number of Splunk forwarders and they are all pushing data to Splunk, you might not notice if one of them goes out of service, because the other forwarders are still pushing data to Splunk. You can run the following search to detect forwarders that have been up in the last 24 hours but not in the last 2 minutes. It uses the forwarder heartbeat, which is a feature of Splunk versions 3.2 and later.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_internal sourcetype="fwd-hb" starthoursago=24 | dedup host | eval age = strftime("%s","now") - _time | search age &amp;gt; 120 age &amp;lt; 86000&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;You can set this search up as an alert every several minutes so that Splunk will let you know if any of your active forwarders have not responded in the last 2 minutes.&lt;/P&gt;

&lt;P&gt;If you're running a version of Splunk that is later than 3.3, the heartbeat message is not longer sent. Use the following search instead:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_internal "group=tcpin_connections" | stats max(_time) as latest by sourceHost | eventstats max(latest) as latest_all | eval lag = latest_all - latest | where lag &amp;gt; 120 | fields sourceHost lag&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The following search works in 3.4.5 and finds all hosts who haven't sent a message in the last 24 hours&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| metadata type=hosts | eval age = strftime("%s","now") - lastTime | search age &amp;gt; 86400 | sort age d | convert ctime(lastTime) | fields age,host,lastTime&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and in 4.0:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| metadata type=hosts | eval age = now() - lastTime | search age &amp;gt; 86400 | sort age d | convert ctime(lastTime) | fields age,host,lastTime&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Another 4.0 variant&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| metadata type=hosts | sort recentTime desc | convert ctime(recentTime) as Recent_Time&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Caveat:
Many of these methods do not account for decommissioned hosts, which you are bound to have after a length of time. These hosts will also show up in the search results, as they also fit the criteria. Incorporating a host tag ('decommisioned', etc) into this search may help with this, but requires you to tag known hosts that are no longer valid. &lt;/P&gt;</description>
    <pubDate>Sat, 20 Mar 2010 06:49:59 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2010-03-20T06:49:59Z</dc:date>
    <item>
      <title>How do I tell if a forwarder is down?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10407#M349</link>
      <description>&lt;P&gt;How can you differentiate between a forwarder being down and a forwarder not having any data to send ? i.e is there a heartbeat that i can tap into?&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2010 06:46:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10407#M349</guid>
      <dc:creator>Alan_Bradley</dc:creator>
      <dc:date>2010-03-20T06:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I tell if a forwarder is down?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10408#M350</link>
      <description>&lt;P&gt;If you have deployed a number of Splunk forwarders and they are all pushing data to Splunk, you might not notice if one of them goes out of service, because the other forwarders are still pushing data to Splunk. You can run the following search to detect forwarders that have been up in the last 24 hours but not in the last 2 minutes. It uses the forwarder heartbeat, which is a feature of Splunk versions 3.2 and later.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_internal sourcetype="fwd-hb" starthoursago=24 | dedup host | eval age = strftime("%s","now") - _time | search age &amp;gt; 120 age &amp;lt; 86000&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;You can set this search up as an alert every several minutes so that Splunk will let you know if any of your active forwarders have not responded in the last 2 minutes.&lt;/P&gt;

&lt;P&gt;If you're running a version of Splunk that is later than 3.3, the heartbeat message is not longer sent. Use the following search instead:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_internal "group=tcpin_connections" | stats max(_time) as latest by sourceHost | eventstats max(latest) as latest_all | eval lag = latest_all - latest | where lag &amp;gt; 120 | fields sourceHost lag&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The following search works in 3.4.5 and finds all hosts who haven't sent a message in the last 24 hours&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| metadata type=hosts | eval age = strftime("%s","now") - lastTime | search age &amp;gt; 86400 | sort age d | convert ctime(lastTime) | fields age,host,lastTime&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and in 4.0:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| metadata type=hosts | eval age = now() - lastTime | search age &amp;gt; 86400 | sort age d | convert ctime(lastTime) | fields age,host,lastTime&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Another 4.0 variant&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| metadata type=hosts | sort recentTime desc | convert ctime(recentTime) as Recent_Time&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Caveat:
Many of these methods do not account for decommissioned hosts, which you are bound to have after a length of time. These hosts will also show up in the search results, as they also fit the criteria. Incorporating a host tag ('decommisioned', etc) into this search may help with this, but requires you to tag known hosts that are no longer valid. &lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2010 06:49:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10408#M350</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2010-03-20T06:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I tell if a forwarder is down?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10409#M351</link>
      <description>&lt;P&gt;I'm going to test this later on 4.1.3 and let you know. I need to provide our Customer a dashboard to monitor all the remote forwarder at a glance.&lt;/P&gt;

&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2010 17:19:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10409#M351</guid>
      <dc:creator>marcoscala</dc:creator>
      <dc:date>2010-07-15T17:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I tell if a forwarder is down?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10410#M352</link>
      <description>&lt;P&gt;Matt, I'v tried with Splunk 4.1.3 the following search: &lt;/P&gt;

&lt;P&gt;"| metadata type=hosts | eval age = strftime("%s","now") - lastTime | search age &amp;gt; 86400 | sort age d | convert ctime(lastTime) | fields age,host,lastTime" &lt;/P&gt;

&lt;P&gt;and I got the following error: &lt;/P&gt;

&lt;P&gt;"Error in 'eval' command: Typechecking failed. '-' only takes numbers." &lt;/P&gt;

&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2010 22:00:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10410#M352</guid>
      <dc:creator>marcoscala</dc:creator>
      <dc:date>2010-07-15T22:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I tell if a forwarder is down?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10411#M353</link>
      <description>&lt;P&gt;Hi All!&lt;/P&gt;

&lt;P&gt;I just made another test and changed a bit the logic. &lt;/P&gt;

&lt;P&gt;I was looking for Forwarders not being sending data for more than let's say 2 minutes. Here's my latest version:&lt;/P&gt;

&lt;P&gt;index=_internal "group=tcpin_connections" | stats max(_time) as latest by sourceHost | eval nowtime = now() | eval lag = (nowtime - latest)/60 | where lag &amp;gt; 2 | fields  sourceHost latest lag&lt;/P&gt;

&lt;P&gt;If you prefere, you can work on seconds of course instead of minutes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2010 20:35:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10411#M353</guid>
      <dc:creator>marcoscala</dc:creator>
      <dc:date>2010-08-25T20:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I tell if a forwarder is down?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10412#M354</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;

&lt;P&gt;How can i check that the forwarders are sending the logs correctly? I have the following error in my logs:&lt;/P&gt;

&lt;P&gt;"eventType=connect_fail" in  metrics.log&lt;/P&gt;

&lt;P&gt;metrics.log:12-17-2014 09:38:48.529 +0100 INFO  StatusMgr - destHost=10.26.XX.XX, destIp=10.26.XX.XX, destPort=9997, eventType=connect_fail, publisher=tcpout, sourcePort=8089, statusee=TcpOutputProcessor&lt;/P&gt;

&lt;P&gt;This event produce that the los are not been sending correctly, them i need know if any option in the program execution can check if splunk is sending or not the data to the server.&lt;/P&gt;

&lt;P&gt;And, can i resolve this issue in the configuration with some parameter? This issue only appear in determinate times isn't fixed.&lt;/P&gt;

&lt;P&gt;Thanks and regards.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2014 11:46:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10412#M354</guid>
      <dc:creator>joseluisrespeto</dc:creator>
      <dc:date>2014-12-18T11:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I tell if a forwarder is down?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10413#M355</link>
      <description>&lt;P&gt;try this&lt;BR /&gt;
| metadata type=hosts&lt;BR /&gt;&lt;BR /&gt;
 | eval lastHour=relative_time(now(),"-1h@h") &lt;BR /&gt;
 | eval yesterday=relative_time(now(), "-1d@d") &lt;BR /&gt;
 | where ( recentTime&amp;gt;yesterday AND recentTime&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:30:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-tell-if-a-forwarder-is-down/m-p/10413#M355</guid>
      <dc:creator>rameshyedurla</dc:creator>
      <dc:date>2020-09-29T08:30:36Z</dc:date>
    </item>
  </channel>
</rss>

