/* minimum session initialization required for monitor mode below */
s->flags = 0;
s->logs.logwait = p->to_log;
- s->tracked_counters = NULL;
- s->tracked_table = NULL;
+ s->fe_tracked_counters = NULL;
+ s->be_tracked_counters = NULL;
+ s->fe_tracked_table = NULL;
+ s->be_tracked_table = NULL;
/* if this session comes from a known monitoring system, we want to ignore
* it as soon as possible, which means closing it immediately for TCP, but
* even initializing the stream interfaces.
*/
if ((l->options & LI_O_TCP_RULES) && !tcp_exec_req_rules(s)) {
- if (s->tracked_counters)
+ if (s->fe_tracked_counters || s->be_tracked_counters)
session_store_counters(s);
task_free(t);
LIST_DEL(&s->list);
if (p->feconn > p->counters.feconn_max)
p->counters.feconn_max = p->feconn;
proxy_inc_fe_sess_ctr(l, p);
- if (s->tracked_counters) {
+ if (s->fe_tracked_counters) {
void *ptr;
- ptr = stktable_data_ptr(s->tracked_table, s->tracked_counters, STKTABLE_DT_SESS_CNT);
+ ptr = stktable_data_ptr(s->fe_tracked_table, s->fe_tracked_counters, STKTABLE_DT_SESS_CNT);
if (ptr)
stktable_data_cast(ptr, sess_cnt)++;
- ptr = stktable_data_ptr(s->tracked_table, s->tracked_counters, STKTABLE_DT_SESS_RATE);
+ ptr = stktable_data_ptr(s->fe_tracked_table, s->fe_tracked_counters, STKTABLE_DT_SESS_RATE);
if (ptr)
update_freq_ctr_period(&stktable_data_cast(ptr, sess_rate),
- s->tracked_table->data_arg[STKTABLE_DT_SESS_RATE].u, 1);
+ s->fe_tracked_table->data_arg[STKTABLE_DT_SESS_RATE].u, 1);
}
/* this part should be common with other protocols */
/* work is finished, we can release everything (eg: monitoring) */
pool_free2(pool2_buffer, s->rep);
pool_free2(pool2_buffer, s->req);
- if (s->tracked_counters)
+ if (s->fe_tracked_counters || s->be_tracked_counters)
session_store_counters(s);
task_free(t);
LIST_DEL(&s->list);
pool_free2(pool2_buffer, s->req);
out_free_task:
p->feconn--;
- if (s->tracked_counters)
+ if (s->fe_tracked_counters || s->be_tracked_counters)
session_store_counters(s);
task_free(t);
out_free_session:
pool_free2(fe->req_cap_pool, txn->req.cap);
}
- if (s->tracked_counters)
+ if (s->fe_tracked_counters || s->be_tracked_counters)
session_store_counters(s);
list_for_each_entry_safe(bref, back, &s->back_refs, users) {
if (s->listener->counters)
s->listener->counters->bytes_in += bytes;
- if (s->tracked_counters) {
+ if (s->be_tracked_counters) {
void *ptr;
- ptr = stktable_data_ptr(s->tracked_table,
- s->tracked_counters,
+ ptr = stktable_data_ptr(s->be_tracked_table,
+ s->be_tracked_counters,
STKTABLE_DT_BYTES_IN_CNT);
if (ptr)
stktable_data_cast(ptr, bytes_in_cnt) += bytes;
- ptr = stktable_data_ptr(s->tracked_table,
- s->tracked_counters,
+ ptr = stktable_data_ptr(s->be_tracked_table,
+ s->be_tracked_counters,
STKTABLE_DT_BYTES_IN_RATE);
if (ptr)
update_freq_ctr_period(&stktable_data_cast(ptr, bytes_in_rate),
- s->tracked_table->data_arg[STKTABLE_DT_BYTES_IN_RATE].u, bytes);
+ s->be_tracked_table->data_arg[STKTABLE_DT_BYTES_IN_RATE].u, bytes);
+ }
+
+ if (s->fe_tracked_counters) {
+ void *ptr;
+
+ ptr = stktable_data_ptr(s->fe_tracked_table,
+ s->fe_tracked_counters,
+ STKTABLE_DT_BYTES_IN_CNT);
+ if (ptr)
+ stktable_data_cast(ptr, bytes_in_cnt) += bytes;
+
+ ptr = stktable_data_ptr(s->fe_tracked_table,
+ s->fe_tracked_counters,
+ STKTABLE_DT_BYTES_IN_RATE);
+ if (ptr)
+ update_freq_ctr_period(&stktable_data_cast(ptr, bytes_in_rate),
+ s->fe_tracked_table->data_arg[STKTABLE_DT_BYTES_IN_RATE].u, bytes);
}
}
}
if (s->listener->counters)
s->listener->counters->bytes_out += bytes;
- if (s->tracked_counters) {
+ if (s->be_tracked_counters) {
+ void *ptr;
+
+ ptr = stktable_data_ptr(s->be_tracked_table,
+ s->be_tracked_counters,
+ STKTABLE_DT_BYTES_OUT_CNT);
+ if (ptr)
+ stktable_data_cast(ptr, bytes_out_cnt) += bytes;
+
+ ptr = stktable_data_ptr(s->be_tracked_table,
+ s->be_tracked_counters,
+ STKTABLE_DT_BYTES_OUT_RATE);
+ if (ptr)
+ update_freq_ctr_period(&stktable_data_cast(ptr, bytes_out_rate),
+ s->be_tracked_table->data_arg[STKTABLE_DT_BYTES_OUT_RATE].u, bytes);
+ }
+
+ if (s->fe_tracked_counters) {
void *ptr;
- ptr = stktable_data_ptr(s->tracked_table,
- s->tracked_counters,
+ ptr = stktable_data_ptr(s->fe_tracked_table,
+ s->fe_tracked_counters,
STKTABLE_DT_BYTES_OUT_CNT);
if (ptr)
stktable_data_cast(ptr, bytes_out_cnt) += bytes;
- ptr = stktable_data_ptr(s->tracked_table,
- s->tracked_counters,
+ ptr = stktable_data_ptr(s->fe_tracked_table,
+ s->fe_tracked_counters,
STKTABLE_DT_BYTES_OUT_RATE);
if (ptr)
update_freq_ctr_period(&stktable_data_cast(ptr, bytes_out_rate),
- s->tracked_table->data_arg[STKTABLE_DT_BYTES_OUT_RATE].u, bytes);
+ s->fe_tracked_table->data_arg[STKTABLE_DT_BYTES_OUT_RATE].u, bytes);
}
}
}
}
/* set test->i to the General Purpose Counter 0 value from the session's tracked
- * counters.
+ * frontend counters.
*/
static int
-acl_fetch_trk_get_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_get_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+ return acl_fetch_get_gpc0(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the General Purpose Counter 0 value from the session's tracked
+ * backend counters.
+ */
+static int
+acl_fetch_trkbe_get_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_get_gpc0(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_get_gpc0(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the General Purpose Counter 0 value from the session's source
}
/* Increment the General Purpose Counter 0 value from the session's tracked
- * counters and return it into test->i.
+ * frontend counters and return it into test->i.
*/
static int
-acl_fetch_trk_inc_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_inc_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+ return acl_fetch_inc_gpc0(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* Increment the General Purpose Counter 0 value from the session's tracked
+ * backend counters and return it into test->i.
+ */
+static int
+acl_fetch_trkbe_inc_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_inc_gpc0(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_inc_gpc0(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* Increment the General Purpose Counter 0 value from the session's source
return 1;
}
-/* set test->i to the cumulated number of connections from the session's tracked counters */
+/* set test->i to the cumulated number of connections from the session's tracked FE counters */
static int
-acl_fetch_trk_conn_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_conn_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_conn_cnt(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the cumulated number of connections from the session's tracked BE counters */
+static int
+acl_fetch_trkbe_conn_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_conn_cnt(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_conn_cnt(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the cumulated number of connections from the session's source
return 1;
}
-/* set test->i to the connection rate from the session's tracked counters over
+/* set test->i to the connection rate from the session's tracked FE counters over
* the configured period.
*/
static int
-acl_fetch_trk_conn_rate(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_conn_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_conn_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the connection rate from the session's tracked BE counters over
+ * the configured period.
+ */
+static int
+acl_fetch_trkbe_conn_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_conn_rate(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_conn_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the connection rate from the session's source address in the
return 1;
}
-/* set test->i to the number of concurrent connections from the session's tracked counters */
+/* set test->i to the number of concurrent connections from the session's tracked FE counters */
static int
-acl_fetch_trk_conn_cur(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_conn_cur(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->fe_tracked_counters)
return 0;
- return acl_fetch_conn_cur(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_conn_cur(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the number of concurrent connections from the session's tracked BE counters */
+static int
+acl_fetch_trkbe_conn_cur(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->be_tracked_counters)
+ return 0;
+
+ return acl_fetch_conn_cur(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the number of concurrent connections from the session's source
return 1;
}
-/* set test->i to the cumulated number of sessions from the session's tracked counters */
+/* set test->i to the cumulated number of sessions from the session's tracked FE counters */
static int
-acl_fetch_trk_sess_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_sess_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_sess_cnt(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the cumulated number of sessions from the session's tracked BE counters */
+static int
+acl_fetch_trkbe_sess_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_sess_cnt(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_sess_cnt(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the cumulated number of session from the session's source
return 1;
}
-/* set test->i to the session rate from the session's tracked counters over
+/* set test->i to the session rate from the session's tracked FE counters over
+ * the configured period.
+ */
+static int
+acl_fetch_trkfe_sess_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_sess_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the session rate from the session's tracked BE counters over
* the configured period.
*/
static int
-acl_fetch_trk_sess_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+acl_fetch_trkbe_sess_rate(struct proxy *px, struct session *l4, void *l7, int dir,
struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_sess_rate(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_sess_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the session rate from the session's source address in the
return 1;
}
-/* set test->i to the cumulated number of sessions from the session's tracked counters */
+/* set test->i to the cumulated number of sessions from the session's tracked FE counters */
static int
-acl_fetch_trk_http_req_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_http_req_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_http_req_cnt(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the cumulated number of sessions from the session's tracked BE counters */
+static int
+acl_fetch_trkbe_http_req_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_http_req_cnt(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_http_req_cnt(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the cumulated number of session from the session's source
return 1;
}
-/* set test->i to the session rate from the session's tracked counters over
+/* set test->i to the session rate from the session's tracked FE counters over
* the configured period.
*/
static int
-acl_fetch_trk_http_req_rate(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_http_req_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_http_req_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the session rate from the session's tracked BE counters over
+ * the configured period.
+ */
+static int
+acl_fetch_trkbe_http_req_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_http_req_rate(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_http_req_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the session rate from the session's source address in the
return 1;
}
-/* set test->i to the cumulated number of sessions from the session's tracked counters */
+/* set test->i to the cumulated number of sessions from the session's tracked FE counters */
static int
-acl_fetch_trk_http_err_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_http_err_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_http_err_cnt(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the cumulated number of sessions from the session's tracked BE counters */
+static int
+acl_fetch_trkbe_http_err_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_http_err_cnt(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_http_err_cnt(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the cumulated number of session from the session's source
return 1;
}
-/* set test->i to the session rate from the session's tracked counters over
+/* set test->i to the session rate from the session's tracked FE counters over
* the configured period.
*/
static int
-acl_fetch_trk_http_err_rate(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_http_err_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_http_err_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the session rate from the session's tracked BE counters over
+ * the configured period.
+ */
+static int
+acl_fetch_trkbe_http_err_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_http_err_rate(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_http_err_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the session rate from the session's source address in the
}
/* set test->i to the number of kbytes received from clients according to the
- * session's tracked counters.
+ * session's tracked FE counters.
*/
static int
-acl_fetch_trk_kbytes_in(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_kbytes_in(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_kbytes_in(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the number of kbytes received from clients according to the
+ * session's tracked BE counters.
+ */
+static int
+acl_fetch_trkbe_kbytes_in(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_kbytes_in(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_kbytes_in(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the number of kbytes received from the session's source
return 1;
}
-/* set test->i to the bytes rate from clients from the session's tracked
+/* set test->i to the bytes rate from clients from the session's tracked FE
* counters over the configured period.
*/
static int
-acl_fetch_trk_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_bytes_in_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the bytes rate from clients from the session's tracked BE
+ * counters over the configured period.
+ */
+static int
+acl_fetch_trkbe_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_bytes_in_rate(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_bytes_in_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the bytes rate from clients from the session's source address
}
/* set test->i to the number of kbytes sent to clients according to the session's
- * tracked counters.
+ * tracked FE counters.
*/
static int
-acl_fetch_trk_kbytes_out(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_kbytes_out(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_kbytes_out(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the number of kbytes sent to clients according to the session's
+ * tracked BE counters.
+ */
+static int
+acl_fetch_trkbe_kbytes_out(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_kbytes_out(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_kbytes_out(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the number of kbytes sent to the session's source address in
return 1;
}
-/* set test->i to the bytes rate to clients from the session's tracked counters
+/* set test->i to the bytes rate to clients from the session's tracked FE counters
* over the configured period.
*/
static int
-acl_fetch_trk_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, int dir,
- struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
+{
+ if (!l4->fe_tracked_counters)
+ return 0;
+
+ return acl_fetch_bytes_out_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the bytes rate to clients from the session's tracked BE counters
+ * over the configured period.
+ */
+static int
+acl_fetch_trkbe_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+ struct acl_expr *expr, struct acl_test *test)
{
- if (!l4->tracked_counters)
+ if (!l4->be_tracked_counters)
return 0;
- return acl_fetch_bytes_out_rate(l4->tracked_table, test, l4->tracked_counters);
+ return acl_fetch_bytes_out_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
}
/* set test->i to the bytes rate to client from the session's source address in
/* Note: must not be declared <const> as its list will be overwritten */
static struct acl_kw_list acl_kws = {{ },{
- { "trk_get_gpc0", acl_parse_int, acl_fetch_trk_get_gpc0, acl_match_int, ACL_USE_NOTHING },
- { "src_get_gpc0", acl_parse_int, acl_fetch_src_get_gpc0, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_inc_gpc0", acl_parse_int, acl_fetch_trk_inc_gpc0, acl_match_int, ACL_USE_NOTHING },
- { "src_inc_gpc0", acl_parse_int, acl_fetch_src_inc_gpc0, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_conn_cnt", acl_parse_int, acl_fetch_trk_conn_cnt, acl_match_int, ACL_USE_NOTHING },
- { "src_conn_cnt", acl_parse_int, acl_fetch_src_conn_cnt, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_conn_rate", acl_parse_int, acl_fetch_trk_conn_rate, acl_match_int, ACL_USE_NOTHING },
- { "src_conn_rate", acl_parse_int, acl_fetch_src_conn_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "src_updt_conn_cnt", acl_parse_int, acl_fetch_src_updt_conn_cnt, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_conn_cur", acl_parse_int, acl_fetch_trk_conn_cur, acl_match_int, ACL_USE_NOTHING },
- { "src_conn_cur", acl_parse_int, acl_fetch_src_conn_cur, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_sess_cnt", acl_parse_int, acl_fetch_trk_sess_cnt, acl_match_int, ACL_USE_NOTHING },
- { "src_sess_cnt", acl_parse_int, acl_fetch_src_sess_cnt, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_sess_rate", acl_parse_int, acl_fetch_trk_sess_rate, acl_match_int, ACL_USE_NOTHING },
- { "src_sess_rate", acl_parse_int, acl_fetch_src_sess_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_http_req_cnt", acl_parse_int, acl_fetch_trk_http_req_cnt, acl_match_int, ACL_USE_NOTHING },
- { "src_http_req_cnt", acl_parse_int, acl_fetch_src_http_req_cnt, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_http_req_rate", acl_parse_int, acl_fetch_trk_http_req_rate, acl_match_int, ACL_USE_NOTHING },
- { "src_http_req_rate", acl_parse_int, acl_fetch_src_http_req_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_http_err_cnt", acl_parse_int, acl_fetch_trk_http_err_cnt, acl_match_int, ACL_USE_NOTHING },
- { "src_http_err_cnt", acl_parse_int, acl_fetch_src_http_err_cnt, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_http_err_rate", acl_parse_int, acl_fetch_trk_http_err_rate, acl_match_int, ACL_USE_NOTHING },
- { "src_http_err_rate", acl_parse_int, acl_fetch_src_http_err_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_kbytes_in", acl_parse_int, acl_fetch_trk_kbytes_in, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "src_kbytes_in", acl_parse_int, acl_fetch_src_kbytes_in, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_bytes_in_rate", acl_parse_int, acl_fetch_trk_bytes_in_rate, acl_match_int, ACL_USE_NOTHING },
- { "src_bytes_in_rate", acl_parse_int, acl_fetch_src_bytes_in_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_kbytes_out", acl_parse_int, acl_fetch_trk_kbytes_out, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "src_kbytes_out", acl_parse_int, acl_fetch_src_kbytes_out, acl_match_int, ACL_USE_TCP4_VOLATILE },
- { "trk_bytes_out_rate", acl_parse_int, acl_fetch_trk_bytes_out_rate,acl_match_int, ACL_USE_NOTHING },
- { "src_bytes_out_rate", acl_parse_int, acl_fetch_src_bytes_out_rate,acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_get_gpc0", acl_parse_int, acl_fetch_trkfe_get_gpc0, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_get_gpc0", acl_parse_int, acl_fetch_trkbe_get_gpc0, acl_match_int, ACL_USE_NOTHING },
+ { "src_get_gpc0", acl_parse_int, acl_fetch_src_get_gpc0, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_inc_gpc0", acl_parse_int, acl_fetch_trkfe_inc_gpc0, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_inc_gpc0", acl_parse_int, acl_fetch_trkbe_inc_gpc0, acl_match_int, ACL_USE_NOTHING },
+ { "src_inc_gpc0", acl_parse_int, acl_fetch_src_inc_gpc0, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_conn_cnt", acl_parse_int, acl_fetch_trkfe_conn_cnt, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_conn_cnt", acl_parse_int, acl_fetch_trkbe_conn_cnt, acl_match_int, ACL_USE_NOTHING },
+ { "src_conn_cnt", acl_parse_int, acl_fetch_src_conn_cnt, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_conn_rate", acl_parse_int, acl_fetch_trkfe_conn_rate, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_conn_rate", acl_parse_int, acl_fetch_trkbe_conn_rate, acl_match_int, ACL_USE_NOTHING },
+ { "src_conn_rate", acl_parse_int, acl_fetch_src_conn_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "src_updt_conn_cnt", acl_parse_int, acl_fetch_src_updt_conn_cnt, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_conn_cur", acl_parse_int, acl_fetch_trkfe_conn_cur, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_conn_cur", acl_parse_int, acl_fetch_trkbe_conn_cur, acl_match_int, ACL_USE_NOTHING },
+ { "src_conn_cur", acl_parse_int, acl_fetch_src_conn_cur, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_sess_cnt", acl_parse_int, acl_fetch_trkfe_sess_cnt, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_sess_cnt", acl_parse_int, acl_fetch_trkbe_sess_cnt, acl_match_int, ACL_USE_NOTHING },
+ { "src_sess_cnt", acl_parse_int, acl_fetch_src_sess_cnt, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_sess_rate", acl_parse_int, acl_fetch_trkfe_sess_rate, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_sess_rate", acl_parse_int, acl_fetch_trkbe_sess_rate, acl_match_int, ACL_USE_NOTHING },
+ { "src_sess_rate", acl_parse_int, acl_fetch_src_sess_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_http_req_cnt", acl_parse_int, acl_fetch_trkfe_http_req_cnt, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_http_req_cnt", acl_parse_int, acl_fetch_trkbe_http_req_cnt, acl_match_int, ACL_USE_NOTHING },
+ { "src_http_req_cnt", acl_parse_int, acl_fetch_src_http_req_cnt, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_http_req_rate", acl_parse_int, acl_fetch_trkfe_http_req_rate, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_http_req_rate", acl_parse_int, acl_fetch_trkbe_http_req_rate, acl_match_int, ACL_USE_NOTHING },
+ { "src_http_req_rate", acl_parse_int, acl_fetch_src_http_req_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_http_err_cnt", acl_parse_int, acl_fetch_trkfe_http_err_cnt, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_http_err_cnt", acl_parse_int, acl_fetch_trkbe_http_err_cnt, acl_match_int, ACL_USE_NOTHING },
+ { "src_http_err_cnt", acl_parse_int, acl_fetch_src_http_err_cnt, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_http_err_rate", acl_parse_int, acl_fetch_trkfe_http_err_rate, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_http_err_rate", acl_parse_int, acl_fetch_trkbe_http_err_rate, acl_match_int, ACL_USE_NOTHING },
+ { "src_http_err_rate", acl_parse_int, acl_fetch_src_http_err_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_kbytes_in", acl_parse_int, acl_fetch_trkfe_kbytes_in, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkbe_kbytes_in", acl_parse_int, acl_fetch_trkbe_kbytes_in, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "src_kbytes_in", acl_parse_int, acl_fetch_src_kbytes_in, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_bytes_in_rate", acl_parse_int, acl_fetch_trkfe_bytes_in_rate, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_bytes_in_rate", acl_parse_int, acl_fetch_trkbe_bytes_in_rate, acl_match_int, ACL_USE_NOTHING },
+ { "src_bytes_in_rate", acl_parse_int, acl_fetch_src_bytes_in_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_kbytes_out", acl_parse_int, acl_fetch_trkfe_kbytes_out, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkbe_kbytes_out", acl_parse_int, acl_fetch_trkbe_kbytes_out, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "src_kbytes_out", acl_parse_int, acl_fetch_src_kbytes_out, acl_match_int, ACL_USE_TCP4_VOLATILE },
+ { "trkfe_bytes_out_rate", acl_parse_int, acl_fetch_trkfe_bytes_out_rate, acl_match_int, ACL_USE_NOTHING },
+ { "trkbe_bytes_out_rate", acl_parse_int, acl_fetch_trkbe_bytes_out_rate, acl_match_int, ACL_USE_NOTHING },
+ { "src_bytes_out_rate", acl_parse_int, acl_fetch_src_bytes_out_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
{ NULL, NULL, NULL, NULL },
}};