-------------------------------------------------+-------------
accept_date([<unit>]) integer
bc.timer.connect integer
+bc_be_queue integer
bc_dst ip
bc_dst_port integer
bc_err integer
bc_http_major integer
bc_src ip
bc_src_port integer
+bc_srv_queue integer
be_id integer
be_name string
bc_rtt(<unit>) integer
equivalent of %Tc in the log-format. This is reported in milliseconds (ms).
For more information see Section 8.4 "Timing events"
+bc_be_queue : integer
+ Number of streams de-queued while waiting for a connection slot on the
+ target backend. This is the equivalent of %bq in the log-format.
+
bc_dst : ip
This is the destination ip address of the connection on the server side,
which is the server address HAProxy connected to. It is of type IP and works
Returns an integer value corresponding to the TCP source port of the
connection on the server side, which is the port HAProxy connected from.
+bc_srv_queue : integer
+ Number of streams de-queued while waiting for a connection slot on the
+ target server. This is the equivalent of %sq in the log-format.
+
be_id : integer
Returns an integer containing the current backend's id. It can be used in
frontends with responses to check which backend processed the request. If
| | | %[bc_src_port] | numeric |
+---+------+------------------------------------------------------+---------+
| | %bq | backend_queue | numeric |
+ | | | %[bc_be_queue] | |
+---+------+------------------------------------------------------+---------+
| | %ci | client_ip (accepted address) | |
| | | %[src] | IP |
| | | %[bc_dst_port] | numeric |
+---+------+------------------------------------------------------+---------+
| | %sq | srv_queue | numeric |
+ | | | %[bc_srv_queue] | |
+---+------+------------------------------------------------------+---------+
| S | %sslc| ssl_ciphers (ex: AES-SHA) | |
| | | %[ssl_fc_cipher] | string |
return 0;
}
+/* Server conn queueing infos - bc_{be,srv}_queue */
+static int smp_fetch_conn_queues(const struct arg *args, struct sample *smp, const char *kw, void *private)
+{
+ struct strm_logs *logs;
+
+ if (!smp->strm)
+ return 0;
+
+ smp->data.type = SMP_T_SINT;
+ smp->flags = 0;
+
+ logs = &smp->strm->logs;
+
+ if (kw[3] == 'b') {
+ /* bc_be_queue */
+ smp->data.u.sint = logs->prx_queue_pos;
+ }
+ else {
+ /* bc_srv_queue */
+ smp->data.u.sint = logs->srv_queue_pos;
+ }
+ return 1;
+}
+
/* Timing events {f,bc}.timer. */
static int smp_fetch_conn_timers(const struct arg *args, struct sample *smp, const char *kw, void *private)
{
{ "txn.timer.user", smp_fetch_txn_timers, 0, NULL, SMP_T_SINT, SMP_USE_TXFIN }, /* "Tu" */
{ "bc.timer.connect", smp_fetch_conn_timers, 0, NULL, SMP_T_SINT, SMP_USE_L4SRV }, /* "Tc" */
+ { "bc_be_queue", smp_fetch_conn_queues, 0, NULL, SMP_T_SINT, SMP_USE_L4SRV }, /* "bq" */
+ { "bc_srv_queue", smp_fetch_conn_queues, 0, NULL, SMP_T_SINT, SMP_USE_L4SRV }, /* "sq" */
+
{ "fc.timer.handshake", smp_fetch_conn_timers, 0, NULL, SMP_T_SINT, SMP_USE_L4CLI }, /* "Th" */
{ "fc.timer.total", smp_fetch_conn_timers, 0, NULL, SMP_T_SINT, SMP_USE_SSFIN }, /* "Tt" */