<?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 Alerting on forwarder up/down events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Alerting-on-forwarder-up-down-events/m-p/14292#M1441</link>
    <description>&lt;P&gt;I have a saved search that notifies me when a forwarder goes up or down based on various &lt;CODE&gt;TcpInputProc&lt;/CODE&gt; and &lt;CODE&gt;TcpOutputProc&lt;/CODE&gt; messages coming from both the indexer and the forwarder machines.&lt;/P&gt;

&lt;P&gt;The problem I'm running into is that I'm seeing a bunch of messages like this even when the forwarder is not going down.  Anybody know why this is happening, or a more reliable message that I can use for this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;05-26-2010 11:24:18.346 INFO  TcpInputProc - Hostname=host.domain.com closed connection&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I'm wondering if this simply means that the connection was temporarily closed due to no data, but that would seem odd since I'm seeing this primarily on a few servers that are fairly busy.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;For anyone interested.  My full search runs ever 5 minutes, and looks like this:  &lt;EM&gt;(Be prepared to do some scrolling)&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=_internal sourcetype="splunkd" (TcpInputProc "closed connection" OR "Connection accepted from") NOT localhost | eval sender=if(searchmatch("TcpOutputProc"),host,"") | eval receiver=if(searchmatch("TcpInputProc"),host,"") | eval action=if(searchmatch("Connect* accepted OR to"),"up", "down") | eval sender=coalesce(Hostname,sender) | rex "to (?&amp;lt;receiver&amp;gt;[^:]+)(:\d+)?" | rex "from (?&amp;lt;sender&amp;gt;\S+)" | replace "dnsname.example.com" with "splunk.domain.com", "anotherdnsname.domain.com" with "therealservername.domain.com" in sender, receiver | stats min(_time) as start_time, max(_time) as end_time, list(action) as actions, first(action) as final_state by sender,receiver | eval start_time=strftime(start_time,"%I:%M %p") | eval end_time=strftime(end_time,"%I:%M %p")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 26 May 2010 22:56:51 GMT</pubDate>
    <dc:creator>Lowell</dc:creator>
    <dc:date>2010-05-26T22:56:51Z</dc:date>
    <item>
      <title>Alerting on forwarder up/down events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Alerting-on-forwarder-up-down-events/m-p/14292#M1441</link>
      <description>&lt;P&gt;I have a saved search that notifies me when a forwarder goes up or down based on various &lt;CODE&gt;TcpInputProc&lt;/CODE&gt; and &lt;CODE&gt;TcpOutputProc&lt;/CODE&gt; messages coming from both the indexer and the forwarder machines.&lt;/P&gt;

&lt;P&gt;The problem I'm running into is that I'm seeing a bunch of messages like this even when the forwarder is not going down.  Anybody know why this is happening, or a more reliable message that I can use for this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
  &lt;P&gt;05-26-2010 11:24:18.346 INFO  TcpInputProc - Hostname=host.domain.com closed connection&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I'm wondering if this simply means that the connection was temporarily closed due to no data, but that would seem odd since I'm seeing this primarily on a few servers that are fairly busy.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;For anyone interested.  My full search runs ever 5 minutes, and looks like this:  &lt;EM&gt;(Be prepared to do some scrolling)&lt;/EM&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=_internal sourcetype="splunkd" (TcpInputProc "closed connection" OR "Connection accepted from") NOT localhost | eval sender=if(searchmatch("TcpOutputProc"),host,"") | eval receiver=if(searchmatch("TcpInputProc"),host,"") | eval action=if(searchmatch("Connect* accepted OR to"),"up", "down") | eval sender=coalesce(Hostname,sender) | rex "to (?&amp;lt;receiver&amp;gt;[^:]+)(:\d+)?" | rex "from (?&amp;lt;sender&amp;gt;\S+)" | replace "dnsname.example.com" with "splunk.domain.com", "anotherdnsname.domain.com" with "therealservername.domain.com" in sender, receiver | stats min(_time) as start_time, max(_time) as end_time, list(action) as actions, first(action) as final_state by sender,receiver | eval start_time=strftime(start_time,"%I:%M %p") | eval end_time=strftime(end_time,"%I:%M %p")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 May 2010 22:56:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Alerting-on-forwarder-up-down-events/m-p/14292#M1441</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-05-26T22:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Alerting on forwarder up/down events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Alerting-on-forwarder-up-down-events/m-p/14293#M1442</link>
      <description>&lt;P&gt;I recommend using the hosts metadata and searching for events received.  Metadata contains when the last event was received from a specific host, source, or sourcetype.   You can use a where statement that compares the last time an event was received to ensure that data is streaming.   The reasons this is better than searching the splunkd log:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;You will know an event has actually come through&lt;/LI&gt;
&lt;LI&gt;The search itself is significantly
faster&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;The search I use is as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=hosts | eval diff=now()-recentTime | where diff &amp;lt; 600 | convert ctime(*Time)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will tell you what hosts have sent data in the past 10 minutes.&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2010 01:46:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Alerting-on-forwarder-up-down-events/m-p/14293#M1442</guid>
      <dc:creator>Simeon</dc:creator>
      <dc:date>2010-05-28T01:46:34Z</dc:date>
    </item>
  </channel>
</rss>

