This currently has the same behaviour as "down".
+ Failure to connect to the agent is not considered an error as connectivity
+ is tested by the regular health check which is enabled by the "check"
+ parameter.
+
Requires the ""agent-port" parameter to be set.
See also the "agent-check" parameter.
tv_zero(&check->start);
}
+ /* Failure to connect to the agent as a secondary check should not
+ * cause the server to be marked down. So only log status changes
+ * for HCHK_STATUS_* statuses */
+ if (check == &s->agent && check->status < HCHK_STATUS_L7TOUT)
+ return;
+
if (s->proxy->options2 & PR_O2_LOGHCHKS &&
(((check->health != 0) && (check->result & SRV_CHK_FAILED)) ||
((check->health != s->rise + s->fall - 1) && (check->result & SRV_CHK_PASSED)) ||
{
struct server *s = check->server;
+ /* The agent secondary check should only cause a server to be marked
+ * as down if check->status is HCHK_STATUS_L7STS, which indicates
+ * that the agent returned "fail", "stopped" or "down".
+ * The implication here is that failure to connect to the agent
+ * as a secondary check should not cause the server to be marked
+ * down. */
+ if (check == &s->agent && check->status != HCHK_STATUS_L7STS)
+ return;
+
if (check->health > s->rise) {
check->health--; /* still good */
s->counters.failed_checks++;