"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "contrib/prometheus-exporter/service-prometheus.c" between
haproxy-2.0.13.tar.gz and haproxy-2.0.14.tar.gz

About: HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments. LTS (Long-Term Support) release.

service-prometheus.c  (haproxy-2.0.13):service-prometheus.c  (haproxy-2.0.14)
skipping to change at line 370 skipping to change at line 370
[ST_F_BIN] = ST_F_BOUT, [ST_F_BIN] = ST_F_BOUT,
[ST_F_BOUT] = ST_F_QTIME, [ST_F_BOUT] = ST_F_QTIME,
[ST_F_DREQ] = 0, [ST_F_DREQ] = 0,
[ST_F_DRESP] = ST_F_ECON, [ST_F_DRESP] = ST_F_ECON,
[ST_F_EREQ] = 0, [ST_F_EREQ] = 0,
[ST_F_ECON] = ST_F_ERESP, [ST_F_ECON] = ST_F_ERESP,
[ST_F_ERESP] = ST_F_WRETR, [ST_F_ERESP] = ST_F_WRETR,
[ST_F_WRETR] = ST_F_WREDIS, [ST_F_WRETR] = ST_F_WREDIS,
[ST_F_WREDIS] = ST_F_WREW, [ST_F_WREDIS] = ST_F_WREW,
[ST_F_STATUS] = ST_F_SCUR, [ST_F_STATUS] = ST_F_SCUR,
[ST_F_WEIGHT] = ST_F_CHKFAIL, [ST_F_WEIGHT] = ST_F_CHECK_STATUS,
[ST_F_ACT] = 0, [ST_F_ACT] = 0,
[ST_F_BCK] = 0, [ST_F_BCK] = 0,
[ST_F_CHKFAIL] = ST_F_CHKDOWN, [ST_F_CHKFAIL] = ST_F_CHKDOWN,
[ST_F_CHKDOWN] = ST_F_DOWNTIME, [ST_F_CHKDOWN] = ST_F_DOWNTIME,
[ST_F_LASTCHG] = ST_F_THROTTLE, [ST_F_LASTCHG] = ST_F_THROTTLE,
[ST_F_DOWNTIME] = ST_F_LASTCHG, [ST_F_DOWNTIME] = ST_F_LASTCHG,
[ST_F_QLIMIT] = ST_F_BIN, [ST_F_QLIMIT] = ST_F_BIN,
[ST_F_PID] = 0, [ST_F_PID] = 0,
[ST_F_IID] = 0, [ST_F_IID] = 0,
[ST_F_SID] = 0, [ST_F_SID] = 0,
[ST_F_THROTTLE] = ST_F_LBTOT, [ST_F_THROTTLE] = ST_F_LBTOT,
[ST_F_LBTOT] = ST_F_HRSP_1XX, [ST_F_LBTOT] = ST_F_HRSP_1XX,
[ST_F_TRACKED] = 0, [ST_F_TRACKED] = 0,
[ST_F_TYPE] = 0, [ST_F_TYPE] = 0,
[ST_F_RATE] = 0, [ST_F_RATE] = 0,
[ST_F_RATE_LIM] = 0, [ST_F_RATE_LIM] = 0,
[ST_F_RATE_MAX] = ST_F_LASTSESS, [ST_F_RATE_MAX] = ST_F_LASTSESS,
[ST_F_CHECK_STATUS] = 0, [ST_F_CHECK_STATUS] = ST_F_CHECK_CODE,
[ST_F_CHECK_CODE] = 0, [ST_F_CHECK_CODE] = ST_F_CHECK_DURATION,
[ST_F_CHECK_DURATION] = 0, [ST_F_CHECK_DURATION] = ST_F_CHKFAIL,
[ST_F_HRSP_1XX] = ST_F_HRSP_2XX, [ST_F_HRSP_1XX] = ST_F_HRSP_2XX,
[ST_F_HRSP_2XX] = ST_F_HRSP_3XX, [ST_F_HRSP_2XX] = ST_F_HRSP_3XX,
[ST_F_HRSP_3XX] = ST_F_HRSP_4XX, [ST_F_HRSP_3XX] = ST_F_HRSP_4XX,
[ST_F_HRSP_4XX] = ST_F_HRSP_5XX, [ST_F_HRSP_4XX] = ST_F_HRSP_5XX,
[ST_F_HRSP_5XX] = ST_F_HRSP_OTHER, [ST_F_HRSP_5XX] = ST_F_HRSP_OTHER,
[ST_F_HRSP_OTHER] = ST_F_SRV_ICUR, [ST_F_HRSP_OTHER] = ST_F_SRV_ICUR,
[ST_F_HANAFAIL] = 0, [ST_F_HANAFAIL] = 0,
[ST_F_REQ_RATE] = 0, [ST_F_REQ_RATE] = 0,
[ST_F_REQ_RATE_MAX] = 0, [ST_F_REQ_RATE_MAX] = 0,
[ST_F_REQ_TOT] = 0, [ST_F_REQ_TOT] = 0,
skipping to change at line 552 skipping to change at line 552
[ST_F_SID] = IST("server_id"), [ST_F_SID] = IST("server_id"),
[ST_F_THROTTLE] = IST("current_throttle"), [ST_F_THROTTLE] = IST("current_throttle"),
[ST_F_LBTOT] = IST("loadbalanced_total"), [ST_F_LBTOT] = IST("loadbalanced_total"),
[ST_F_TRACKED] = IST("tracked"), [ST_F_TRACKED] = IST("tracked"),
[ST_F_TYPE] = IST("type"), [ST_F_TYPE] = IST("type"),
[ST_F_RATE] = IST("current_session_rate"), [ST_F_RATE] = IST("current_session_rate"),
[ST_F_RATE_LIM] = IST("limit_session_rate"), [ST_F_RATE_LIM] = IST("limit_session_rate"),
[ST_F_RATE_MAX] = IST("max_session_rate"), [ST_F_RATE_MAX] = IST("max_session_rate"),
[ST_F_CHECK_STATUS] = IST("check_status"), [ST_F_CHECK_STATUS] = IST("check_status"),
[ST_F_CHECK_CODE] = IST("check_code"), [ST_F_CHECK_CODE] = IST("check_code"),
[ST_F_CHECK_DURATION] = IST("check_duration_milliseconds"), [ST_F_CHECK_DURATION] = IST("check_duration_seconds"),
[ST_F_HRSP_1XX] = IST("http_responses_total"), [ST_F_HRSP_1XX] = IST("http_responses_total"),
[ST_F_HRSP_2XX] = IST("http_responses_total"), [ST_F_HRSP_2XX] = IST("http_responses_total"),
[ST_F_HRSP_3XX] = IST("http_responses_total"), [ST_F_HRSP_3XX] = IST("http_responses_total"),
[ST_F_HRSP_4XX] = IST("http_responses_total"), [ST_F_HRSP_4XX] = IST("http_responses_total"),
[ST_F_HRSP_5XX] = IST("http_responses_total"), [ST_F_HRSP_5XX] = IST("http_responses_total"),
[ST_F_HRSP_OTHER] = IST("http_responses_total"), [ST_F_HRSP_OTHER] = IST("http_responses_total"),
[ST_F_HANAFAIL] = IST("check_analyses_failures_total"), [ST_F_HANAFAIL] = IST("check_analyses_failures_total"),
[ST_F_REQ_RATE] = IST("http_requests_rate_current"), [ST_F_REQ_RATE] = IST("http_requests_rate_current"),
[ST_F_REQ_RATE_MAX] = IST("http_requests_rate_max"), [ST_F_REQ_RATE_MAX] = IST("http_requests_rate_max"),
[ST_F_REQ_TOT] = IST("http_requests_total"), [ST_F_REQ_TOT] = IST("http_requests_total"),
skipping to change at line 712 skipping to change at line 712
[ST_F_PID] = IST("Process id (0 for first instance, 1 for seco nd, ...)"), [ST_F_PID] = IST("Process id (0 for first instance, 1 for seco nd, ...)"),
[ST_F_IID] = IST("Unique proxy id."), [ST_F_IID] = IST("Unique proxy id."),
[ST_F_SID] = IST("Server id (unique inside a proxy)."), [ST_F_SID] = IST("Server id (unique inside a proxy)."),
[ST_F_THROTTLE] = IST("Current throttle percentage for the server, when slowstart is active, or no value if not in slowstart."), [ST_F_THROTTLE] = IST("Current throttle percentage for the server, when slowstart is active, or no value if not in slowstart."),
[ST_F_LBTOT] = IST("Total number of times a service was selected , either for new sessions, or when redispatching."), [ST_F_LBTOT] = IST("Total number of times a service was selected , either for new sessions, or when redispatching."),
[ST_F_TRACKED] = IST("Id of proxy/server if tracking is enabled.") , [ST_F_TRACKED] = IST("Id of proxy/server if tracking is enabled.") ,
[ST_F_TYPE] = IST("Service type (0=frontend, 1=backend, 2=serve r, 3=socket/listener)."), [ST_F_TYPE] = IST("Service type (0=frontend, 1=backend, 2=serve r, 3=socket/listener)."),
[ST_F_RATE] = IST("Current number of sessions per second over l ast elapsed second."), [ST_F_RATE] = IST("Current number of sessions per second over l ast elapsed second."),
[ST_F_RATE_LIM] = IST("Configured limit on new sessions per second. "), [ST_F_RATE_LIM] = IST("Configured limit on new sessions per second. "),
[ST_F_RATE_MAX] = IST("Maximum observed number of sessions per seco nd."), [ST_F_RATE_MAX] = IST("Maximum observed number of sessions per seco nd."),
[ST_F_CHECK_STATUS] = IST("Status of last health check (If a check is r unning, the status will be reported, prefixed with '* ')."), [ST_F_CHECK_STATUS] = IST("Status of last health check (HCHK_STATUS_* v alues)."),
[ST_F_CHECK_CODE] = IST("layer5-7 code, if available of the last heal th check."), [ST_F_CHECK_CODE] = IST("layer5-7 code, if available of the last heal th check."),
[ST_F_CHECK_DURATION] = IST("Time in ms took to finish last health check. "), [ST_F_CHECK_DURATION] = IST("Total duration of the latest server health c heck, in seconds."),
[ST_F_HRSP_1XX] = IST("Total number of HTTP responses."), [ST_F_HRSP_1XX] = IST("Total number of HTTP responses."),
[ST_F_HRSP_2XX] = IST("Total number of HTTP responses."), [ST_F_HRSP_2XX] = IST("Total number of HTTP responses."),
[ST_F_HRSP_3XX] = IST("Total number of HTTP responses."), [ST_F_HRSP_3XX] = IST("Total number of HTTP responses."),
[ST_F_HRSP_4XX] = IST("Total number of HTTP responses."), [ST_F_HRSP_4XX] = IST("Total number of HTTP responses."),
[ST_F_HRSP_5XX] = IST("Total number of HTTP responses."), [ST_F_HRSP_5XX] = IST("Total number of HTTP responses."),
[ST_F_HRSP_OTHER] = IST("Total number of HTTP responses."), [ST_F_HRSP_OTHER] = IST("Total number of HTTP responses."),
[ST_F_HANAFAIL] = IST("Total number of failed health checks."), [ST_F_HANAFAIL] = IST("Total number of failed health checks."),
[ST_F_REQ_RATE] = IST("Current number of HTTP requests per second o ver last elapsed second."), [ST_F_REQ_RATE] = IST("Current number of HTTP requests per second o ver last elapsed second."),
[ST_F_REQ_RATE_MAX] = IST("Maximum observed number of HTTP requests per second."), [ST_F_REQ_RATE_MAX] = IST("Maximum observed number of HTTP requests per second."),
[ST_F_REQ_TOT] = IST("Total number of HTTP requests received."), [ST_F_REQ_TOT] = IST("Total number of HTTP requests received."),
skipping to change at line 1030 skipping to change at line 1030
[ST_F_PID] = IST("untyped"), [ST_F_PID] = IST("untyped"),
[ST_F_IID] = IST("untyped"), [ST_F_IID] = IST("untyped"),
[ST_F_SID] = IST("untyped"), [ST_F_SID] = IST("untyped"),
[ST_F_THROTTLE] = IST("gauge"), [ST_F_THROTTLE] = IST("gauge"),
[ST_F_LBTOT] = IST("counter"), [ST_F_LBTOT] = IST("counter"),
[ST_F_TRACKED] = IST("untyped"), [ST_F_TRACKED] = IST("untyped"),
[ST_F_TYPE] = IST("untyped"), [ST_F_TYPE] = IST("untyped"),
[ST_F_RATE] = IST("untyped"), [ST_F_RATE] = IST("untyped"),
[ST_F_RATE_LIM] = IST("gauge"), [ST_F_RATE_LIM] = IST("gauge"),
[ST_F_RATE_MAX] = IST("gauge"), [ST_F_RATE_MAX] = IST("gauge"),
[ST_F_CHECK_STATUS] = IST("untyped"), [ST_F_CHECK_STATUS] = IST("gauge"),
[ST_F_CHECK_CODE] = IST("untyped"), [ST_F_CHECK_CODE] = IST("gauge"),
[ST_F_CHECK_DURATION] = IST("gauge"), [ST_F_CHECK_DURATION] = IST("gauge"),
[ST_F_HRSP_1XX] = IST("counter"), [ST_F_HRSP_1XX] = IST("counter"),
[ST_F_HRSP_2XX] = IST("counter"), [ST_F_HRSP_2XX] = IST("counter"),
[ST_F_HRSP_3XX] = IST("counter"), [ST_F_HRSP_3XX] = IST("counter"),
[ST_F_HRSP_4XX] = IST("counter"), [ST_F_HRSP_4XX] = IST("counter"),
[ST_F_HRSP_5XX] = IST("counter"), [ST_F_HRSP_5XX] = IST("counter"),
[ST_F_HRSP_OTHER] = IST("counter"), [ST_F_HRSP_OTHER] = IST("counter"),
[ST_F_HANAFAIL] = IST("counter"), [ST_F_HANAFAIL] = IST("counter"),
[ST_F_REQ_RATE] = IST("untyped"), [ST_F_REQ_RATE] = IST("untyped"),
[ST_F_REQ_RATE_MAX] = IST("gauge"), [ST_F_REQ_RATE_MAX] = IST("gauge"),
skipping to change at line 2014 skipping to change at line 2014
case ST_F_CLI_ABRT: case ST_F_CLI_ABRT:
metric = mkf_u64(FN_COUNTER, sv-> counters.cli_aborts); metric = mkf_u64(FN_COUNTER, sv-> counters.cli_aborts);
break; break;
case ST_F_SRV_ABRT: case ST_F_SRV_ABRT:
metric = mkf_u64(FN_COUNTER, sv-> counters.srv_aborts); metric = mkf_u64(FN_COUNTER, sv-> counters.srv_aborts);
break; break;
case ST_F_WEIGHT: case ST_F_WEIGHT:
weight = (sv->cur_eweight * px->l bprm.wmult + px->lbprm.wdiv - 1) / px->lbprm.wdiv; weight = (sv->cur_eweight * px->l bprm.wmult + px->lbprm.wdiv - 1) / px->lbprm.wdiv;
metric = mkf_u32(FN_AVG, weight); metric = mkf_u32(FN_AVG, weight);
break; break;
case ST_F_CHECK_STATUS:
if ((sv->check.state & (CHK_ST_EN
ABLED|CHK_ST_PAUSED)) != CHK_ST_ENABLED)
goto next_sv;
metric = mkf_u32(FN_OUTPUT, sv->c
heck.status);
break;
case ST_F_CHECK_CODE:
if ((sv->check.state & (CHK_ST_EN
ABLED|CHK_ST_PAUSED)) != CHK_ST_ENABLED)
goto next_sv;
metric = mkf_u32(FN_OUTPUT, (sv->
check.status < HCHK_STATUS_L57DATA) ? 0 : sv->check.code);
break;
case ST_F_CHECK_DURATION:
if (sv->check.status < HCHK_STATU
S_CHECKED)
goto next_sv;
secs = (double)sv->check.duration
/ 1000.0;
metric = mkf_flt(FN_DURATION, sec
s);
break;
case ST_F_CHKFAIL: case ST_F_CHKFAIL:
metric = mkf_u64(FN_COUNTER, sv-> counters.failed_checks); metric = mkf_u64(FN_COUNTER, sv-> counters.failed_checks);
break; break;
case ST_F_CHKDOWN: case ST_F_CHKDOWN:
metric = mkf_u64(FN_COUNTER, sv-> counters.down_trans); metric = mkf_u64(FN_COUNTER, sv-> counters.down_trans);
break; break;
case ST_F_DOWNTIME: case ST_F_DOWNTIME:
metric = mkf_u32(FN_COUNTER, srv_ downtime(sv)); metric = mkf_u32(FN_COUNTER, srv_ downtime(sv));
break; break;
case ST_F_LASTCHG: case ST_F_LASTCHG:
 End of changes. 7 change blocks. 
9 lines changed or deleted 32 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)