MINOR: checks: Add an option to set success status of tcp-check expect rules

It is now possible to specified the healthcheck status to use on success of a
tcp-check rule, if it is the last evaluated rule. The option "ok-status"
supports "L4OK", "L6OK", "L7OK" and "L7OKC" status.
This commit is contained in:
Christopher Faulet
2020-04-07 14:56:26 +02:00
parent 799f3a4621
commit ec07e386a7
3 changed files with 48 additions and 9 deletions

View File

@@ -275,6 +275,7 @@ struct tcpcheck_expect {
int min_recv; /* Minimum amount of data before an expect can be applied. (default: -1, ignored) */
struct list onerror_fmt; /* log-format string to use as comment on error */
struct list onsuccess_fmt; /* log-format string to use as comment on success (if last rule) */
enum healthcheck_status ok_status; /* The healthcheck status to use on success (default: L7OKD) */
enum healthcheck_status err_status; /* The healthcheck status to use on error (default: L7RSP) */
enum healthcheck_status tout_status; /* The healthcheck status to use on timeout (default: L7TOUT) */
struct sample_expr *status_expr; /* sample expr to determine the check status code */