const string &host_address,
const int ping_fail_limit_percentage,
const int ping_congestion_limit_percentage,
+ const int congest_caused_by_fail_limit_percentage,
const int ping_duration_congestion_thresh,
const int n_parallel_pings,
const LinkStatusItem link_analyzer
LinkAnalyzer( link_analyzer ),
PingFailLimitPercentage( ping_fail_limit_percentage ),
PingCongestionLimitPercentage( ping_congestion_limit_percentage ),
+ CongestCausedByFailLimitPercentage(congest_caused_by_fail_limit_percentage),
PingDurationCongestionsThresh( ping_duration_congestion_thresh*1000000 ),
ResolvedIpCount( 0 ),
PingsPerformedCount( 0 ),
BOOST_ASSERT( PingsPerformedCount >= ResolvedIpCount*NParallelPingers );
// timeouts are not counted towards failures, only count as congestions
- // However, if all pings timed out even in burst mode, then we still declare
- // the line down
- if (InBurstMode && PingCongestionCount >= PingsPerformedCount)
+ // However, if many pings timed out even in burst mode, then we still
+ // declare the line down
+ float limit = static_cast<float>( PingsPerformedCount
+ * CongestCausedByFailLimitPercentage)/100.f;
+ if (InBurstMode && PingCongestionCount > limit)
{
- GlobalLogger.notice() << log_prefix() << "All pings timed out despite "
- << "using more pings per IP --> assume connection is really down";
+ GlobalLogger.info() << log_prefix()
+ << "Assume congestion is actually caused by compromised connection "
+ << "to host because " << PingCongestionCount << " of "
+ << PingsPerformedCount << " burst pings timed out";
PingsFailedCount += PingCongestionCount;
PingCongestionCount = 0;
ExceededPingFailedLimit = true;