MINOR: contrib/prometheus-exporter: Remove usless rate metrics
Following metrics have been removed: * haproxy_frontend_connections_rate_current (ST_F_CONN_RATE) * haproxy_frontend_http_requests_rate_current (ST_F_REQ_RATE) * haproxy_*_current_session_rate (ST_F_RATE) These rates can be deduced using the total value with this kind of formula: rate(haproxy_frontend_connections_total[1m]) No backport needed. See issue #81 on github.
This commit is contained in:
parent
f782c23ec6
commit
c58fc0dec9
|
@ -123,7 +123,6 @@ Exported metrics
|
|||
| haproxy_frontend_max_sessions | Maximum observed number of active sessions. |
|
||||
| haproxy_frontend_limit_sessions | Configured session limit. |
|
||||
| haproxy_frontend_sessions_total | Total number of sessions. |
|
||||
| haproxy_frontend_current_session_rate | Current number of sessions per second over last elapsed second. |
|
||||
| haproxy_frontend_limit_session_rate | Configured limit on new sessions per second. |
|
||||
| haproxy_frontend_max_session_rate | Maximum observed number of sessions per second. |
|
||||
| haproxy_frontend_connections_rate_current | Current number of connections per second over the last elapsed second. |
|
||||
|
@ -137,7 +136,6 @@ Exported metrics
|
|||
| haproxy_frontend_denied_connections_total | Total number of requests denied by "tcp-request connection" rules. |
|
||||
| haproxy_frontend_denied_sessions_total | Total number of requests denied by "tcp-request session" rules. |
|
||||
| haproxy_frontend_failed_header_rewriting_total | Total number of failed header rewriting warnings. |
|
||||
| haproxy_frontend_http_requests_rate_current | Current number of HTTP requests per second over last elapsed second. |
|
||||
| haproxy_frontend_http_requests_rate_max | Maximum observed number of HTTP requests per second. |
|
||||
| haproxy_frontend_http_requests_total | Total number of HTTP requests received. |
|
||||
| haproxy_frontend_http_responses_total | Total number of HTTP responses. |
|
||||
|
@ -160,7 +158,6 @@ Exported metrics
|
|||
| haproxy_backend_max_sessions | Maximum observed number of active sessions. |
|
||||
| haproxy_backend_limit_sessions | Configured session limit. |
|
||||
| haproxy_backend_sessions_total | Total number of sessions. |
|
||||
| haproxy_backend_current_session_rate | Current number of sessions per second over last elapsed second. |
|
||||
| haproxy_backend_max_session_rate | Maximum observed number of sessions per second. |
|
||||
| haproxy_backend_last_session_seconds | Number of seconds since last session assigned to server/backend. |
|
||||
| haproxy_backend_current_queue | Current number of queued requests. |
|
||||
|
@ -209,7 +206,6 @@ Exported metrics
|
|||
| haproxy_server_max_sessions | Maximum observed number of active sessions. |
|
||||
| haproxy_server_limit_sessions | Configured session limit. |
|
||||
| haproxy_server_sessions_total | Total number of sessions. |
|
||||
| haproxy_server_current_session_rate | Current number of sessions per second over last elapsed second. |
|
||||
| haproxy_server_max_session_rate | Maximum observed number of sessions per second. |
|
||||
| haproxy_server_last_session_seconds | Number of seconds since last session assigned to server/backend. |
|
||||
| haproxy_server_current_queue | Current number of queued requests. |
|
||||
|
|
|
@ -151,7 +151,7 @@ const int promex_front_metrics[ST_F_TOTAL_FIELDS] = {
|
|||
[ST_F_SCUR] = ST_F_SMAX,
|
||||
[ST_F_SMAX] = ST_F_SLIM,
|
||||
[ST_F_SLIM] = ST_F_STOT,
|
||||
[ST_F_STOT] = ST_F_RATE,
|
||||
[ST_F_STOT] = ST_F_RATE_LIM,
|
||||
[ST_F_BIN] = ST_F_BOUT,
|
||||
[ST_F_BOUT] = ST_F_DREQ,
|
||||
[ST_F_DREQ] = ST_F_DRESP,
|
||||
|
@ -177,9 +177,9 @@ const int promex_front_metrics[ST_F_TOTAL_FIELDS] = {
|
|||
[ST_F_LBTOT] = 0,
|
||||
[ST_F_TRACKED] = 0,
|
||||
[ST_F_TYPE] = 0,
|
||||
[ST_F_RATE] = ST_F_RATE_LIM,
|
||||
[ST_F_RATE] = 0,
|
||||
[ST_F_RATE_LIM] = ST_F_RATE_MAX,
|
||||
[ST_F_RATE_MAX] = ST_F_CONN_RATE,
|
||||
[ST_F_RATE_MAX] = ST_F_CONN_RATE_MAX,
|
||||
[ST_F_CHECK_STATUS] = 0,
|
||||
[ST_F_CHECK_CODE] = 0,
|
||||
[ST_F_CHECK_DURATION] = 0,
|
||||
|
@ -190,7 +190,7 @@ const int promex_front_metrics[ST_F_TOTAL_FIELDS] = {
|
|||
[ST_F_HRSP_5XX] = ST_F_HRSP_OTHER,
|
||||
[ST_F_HRSP_OTHER] = ST_F_INTERCEPTED,
|
||||
[ST_F_HANAFAIL] = 0,
|
||||
[ST_F_REQ_RATE] = ST_F_REQ_RATE_MAX,
|
||||
[ST_F_REQ_RATE] = 0,
|
||||
[ST_F_REQ_RATE_MAX] = ST_F_REQ_TOT,
|
||||
[ST_F_REQ_TOT] = ST_F_HRSP_1XX,
|
||||
[ST_F_CLI_ABRT] = 0,
|
||||
|
@ -221,13 +221,13 @@ const int promex_front_metrics[ST_F_TOTAL_FIELDS] = {
|
|||
[ST_F_COOKIE] = 0,
|
||||
[ST_F_MODE] = 0,
|
||||
[ST_F_ALGO] = 0,
|
||||
[ST_F_CONN_RATE] = ST_F_CONN_RATE_MAX,
|
||||
[ST_F_CONN_RATE] = 0,
|
||||
[ST_F_CONN_RATE_MAX] = ST_F_CONN_TOT,
|
||||
[ST_F_CONN_TOT] = ST_F_BIN,
|
||||
[ST_F_INTERCEPTED] = ST_F_CACHE_LOOKUPS,
|
||||
[ST_F_DCON] = ST_F_DSES,
|
||||
[ST_F_DSES] = ST_F_WREW,
|
||||
[ST_F_WREW] = ST_F_REQ_RATE,
|
||||
[ST_F_WREW] = ST_F_REQ_RATE_MAX,
|
||||
[ST_F_CONNECT] = 0,
|
||||
[ST_F_REUSE] = 0,
|
||||
[ST_F_CACHE_LOOKUPS] = ST_F_CACHE_HITS,
|
||||
|
@ -244,7 +244,7 @@ const int promex_back_metrics[ST_F_TOTAL_FIELDS] = {
|
|||
[ST_F_SCUR] = ST_F_SMAX,
|
||||
[ST_F_SMAX] = ST_F_SLIM,
|
||||
[ST_F_SLIM] = ST_F_STOT,
|
||||
[ST_F_STOT] = ST_F_RATE,
|
||||
[ST_F_STOT] = ST_F_RATE_MAX,
|
||||
[ST_F_BIN] = ST_F_BOUT,
|
||||
[ST_F_BOUT] = ST_F_QTIME,
|
||||
[ST_F_DREQ] = ST_F_DRESP,
|
||||
|
@ -270,7 +270,7 @@ const int promex_back_metrics[ST_F_TOTAL_FIELDS] = {
|
|||
[ST_F_LBTOT] = ST_F_REQ_TOT,
|
||||
[ST_F_TRACKED] = 9,
|
||||
[ST_F_TYPE] = 0,
|
||||
[ST_F_RATE] = ST_F_RATE_MAX,
|
||||
[ST_F_RATE] = 0,
|
||||
[ST_F_RATE_LIM] = 0,
|
||||
[ST_F_RATE_MAX] = ST_F_LASTSESS,
|
||||
[ST_F_CHECK_STATUS] = 0,
|
||||
|
@ -337,7 +337,7 @@ const int promex_srv_metrics[ST_F_TOTAL_FIELDS] = {
|
|||
[ST_F_SCUR] = ST_F_SMAX,
|
||||
[ST_F_SMAX] = ST_F_SLIM,
|
||||
[ST_F_SLIM] = ST_F_STOT,
|
||||
[ST_F_STOT] = ST_F_RATE,
|
||||
[ST_F_STOT] = ST_F_RATE_MAX,
|
||||
[ST_F_BIN] = ST_F_BOUT,
|
||||
[ST_F_BOUT] = ST_F_QTIME,
|
||||
[ST_F_DREQ] = 0,
|
||||
|
@ -363,7 +363,7 @@ const int promex_srv_metrics[ST_F_TOTAL_FIELDS] = {
|
|||
[ST_F_LBTOT] = ST_F_HRSP_1XX,
|
||||
[ST_F_TRACKED] = 0,
|
||||
[ST_F_TYPE] = 0,
|
||||
[ST_F_RATE] = ST_F_RATE_MAX,
|
||||
[ST_F_RATE] = 0,
|
||||
[ST_F_RATE_LIM] = 0,
|
||||
[ST_F_RATE_MAX] = ST_F_LASTSESS,
|
||||
[ST_F_CHECK_STATUS] = 0,
|
||||
|
@ -987,7 +987,7 @@ const struct ist promex_st_metric_types[ST_F_TOTAL_FIELDS] = {
|
|||
[ST_F_LBTOT] = IST("counter"),
|
||||
[ST_F_TRACKED] = IST("untyped"),
|
||||
[ST_F_TYPE] = IST("untyped"),
|
||||
[ST_F_RATE] = IST("gauge"),
|
||||
[ST_F_RATE] = IST("untyped"),
|
||||
[ST_F_RATE_LIM] = IST("gauge"),
|
||||
[ST_F_RATE_MAX] = IST("counter"),
|
||||
[ST_F_CHECK_STATUS] = IST("untyped"),
|
||||
|
@ -1000,7 +1000,7 @@ const struct ist promex_st_metric_types[ST_F_TOTAL_FIELDS] = {
|
|||
[ST_F_HRSP_5XX] = IST("counter"),
|
||||
[ST_F_HRSP_OTHER] = IST("counter"),
|
||||
[ST_F_HANAFAIL] = IST("counter"),
|
||||
[ST_F_REQ_RATE] = IST("gauge"),
|
||||
[ST_F_REQ_RATE] = IST("untyped"),
|
||||
[ST_F_REQ_RATE_MAX] = IST("counter"),
|
||||
[ST_F_REQ_TOT] = IST("counter"),
|
||||
[ST_F_CLI_ABRT] = IST("counter"),
|
||||
|
@ -1031,7 +1031,7 @@ const struct ist promex_st_metric_types[ST_F_TOTAL_FIELDS] = {
|
|||
[ST_F_COOKIE] = IST("untyped"),
|
||||
[ST_F_MODE] = IST("untyped"),
|
||||
[ST_F_ALGO] = IST("untyped"),
|
||||
[ST_F_CONN_RATE] = IST("gauge"),
|
||||
[ST_F_CONN_RATE] = IST("untyped"),
|
||||
[ST_F_CONN_RATE_MAX] = IST("counter"),
|
||||
[ST_F_CONN_TOT] = IST("counter"),
|
||||
[ST_F_INTERCEPTED] = IST("counter"),
|
||||
|
@ -1454,18 +1454,12 @@ static int promex_dump_front_metrics(struct appctx *appctx, struct htx *htx)
|
|||
case ST_F_STOT:
|
||||
metric = mkf_u64(FN_COUNTER, px->fe_counters.cum_sess);
|
||||
break;
|
||||
case ST_F_RATE:
|
||||
metric = mkf_u32(FN_RATE, read_freq_ctr(&px->fe_sess_per_sec));
|
||||
break;
|
||||
case ST_F_RATE_LIM:
|
||||
metric = mkf_u32(FO_CONFIG|FN_LIMIT, px->fe_sps_lim);
|
||||
break;
|
||||
case ST_F_RATE_MAX:
|
||||
metric = mkf_u32(FN_MAX, px->fe_counters.sps_max);
|
||||
break;
|
||||
case ST_F_CONN_RATE:
|
||||
metric = mkf_u32(FN_RATE, read_freq_ctr(&px->fe_conn_per_sec));
|
||||
break;
|
||||
case ST_F_CONN_RATE_MAX:
|
||||
metric = mkf_u32(FN_MAX, px->fe_counters.cps_max);
|
||||
break;
|
||||
|
@ -1496,11 +1490,6 @@ static int promex_dump_front_metrics(struct appctx *appctx, struct htx *htx)
|
|||
case ST_F_WREW:
|
||||
metric = mkf_u64(FN_COUNTER, px->fe_counters.failed_rewrites);
|
||||
break;
|
||||
case ST_F_REQ_RATE:
|
||||
if (px->mode != PR_MODE_HTTP)
|
||||
goto next_px;
|
||||
metric = mkf_u32(FN_RATE, read_freq_ctr(&px->fe_req_per_sec));
|
||||
break;
|
||||
case ST_F_REQ_RATE_MAX:
|
||||
if (px->mode != PR_MODE_HTTP)
|
||||
goto next_px;
|
||||
|
@ -1644,9 +1633,6 @@ static int promex_dump_back_metrics(struct appctx *appctx, struct htx *htx)
|
|||
case ST_F_STOT:
|
||||
metric = mkf_u64(FN_COUNTER, px->be_counters.cum_conn);
|
||||
break;
|
||||
case ST_F_RATE:
|
||||
metric = mkf_u32(0, read_freq_ctr(&px->be_sess_per_sec));
|
||||
break;
|
||||
case ST_F_RATE_MAX:
|
||||
metric = mkf_u32(0, px->be_counters.sps_max);
|
||||
break;
|
||||
|
@ -1869,9 +1855,6 @@ static int promex_dump_srv_metrics(struct appctx *appctx, struct htx *htx)
|
|||
case ST_F_STOT:
|
||||
metric = mkf_u64(FN_COUNTER, sv->counters.cum_sess);
|
||||
break;
|
||||
case ST_F_RATE:
|
||||
metric = mkf_u32(FN_RATE, read_freq_ctr(&sv->sess_per_sec));
|
||||
break;
|
||||
case ST_F_RATE_MAX:
|
||||
metric = mkf_u32(FN_MAX, sv->counters.sps_max);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue