-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add metric_type mapping to stat datastream of HA Proxy #7183
Changes from all commits
8e6827b
686d227
a229201
903bb5c
c0779f9
1ed3611
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,12 @@ | |
Status (UP, DOWN, NOLB, MAINT, or MAINT(via)...). | ||
- name: weight | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Total weight (for backends), or server weight (for servers). | ||
- name: downtime | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Total downtime (in seconds). For backends, this value is the downtime for the whole backend, not the sum of the downtime for the servers. | ||
- name: component_type | ||
|
@@ -24,24 +26,29 @@ | |
- name: in.bytes | ||
type: long | ||
format: bytes | ||
metric_type: counter | ||
description: | | ||
Bytes in. | ||
- name: out.bytes | ||
type: long | ||
format: bytes | ||
metric_type: counter | ||
description: | | ||
Bytes out. | ||
- name: last_change | ||
type: integer | ||
metric_type: gauge | ||
description: | | ||
Number of seconds since the last UP->DOWN or DOWN->UP transition. | ||
- name: throttle.pct | ||
type: scaled_float | ||
format: percent | ||
metric_type: gauge | ||
description: | | ||
Current throttle percentage for the server when slowstart is active, or no value if slowstart is inactive. | ||
- name: selected.total | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Total number of times a server was selected, either for new sessions, or when re-dispatching. For servers, this field reports the the number of times the server was selected. | ||
- name: tracked.id | ||
|
@@ -61,82 +68,99 @@ | |
fields: | ||
- name: total | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Cumulative number of connections. | ||
- name: retried | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of times a connection to a server was retried. | ||
- name: time.avg | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Average connect time in ms over the last 1024 requests. | ||
- name: rate | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Number of connections over the last second. | ||
- name: rate_max | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Highest value of connection.rate. | ||
- name: attempt.total | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of connection establishment attempts. | ||
- name: reuse.total | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of connection reuses. | ||
- name: idle | ||
type: group | ||
fields: | ||
- name: total | ||
type: long | ||
metric_type: gauge | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. idle.total is it a counter instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The schema definition is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should it be named like idle.current instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it would have been optimal. The description goes as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it is to be changed, I would prefer that taken up as a separate enhancement with an assessment of impact (say dashboard changes). Agree? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I agree, any un-related changes can be filed as a separate backlogs. In this doc also: idle section coming empty.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I generated some traffic to populate the value for
|
||
description: | | ||
Number of idle connections available for reuse. | ||
- name: limit | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Limit on idle connections available for reuse. | ||
- name: cache | ||
type: group | ||
fields: | ||
- name: lookup.total | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of cache lookups. | ||
- name: hits | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of cache hits. | ||
- name: request | ||
type: group | ||
fields: | ||
- name: denied | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Requests denied because of security concerns. | ||
|
||
* For TCP this is because of a matched tcp-request content rule. | ||
* For HTTP this is because of a matched http-request or tarpit rule. | ||
- name: denied_by_connection_rules | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Requests denied because of TCP request connection rules. | ||
- name: denied_by_session_rules | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Requests denied because of TCP request session rules. | ||
- name: queued.current | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Current queued requests. For backends, this field reports the number of requests queued without a server assigned. | ||
- name: queued.max | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Maximum value of queued.current. | ||
- name: errors | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Request errors. Some of the possible causes are: | ||
|
||
|
@@ -148,72 +172,87 @@ | |
* request was tarpitted. | ||
- name: redispatched | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of times a request was redispatched to another server. For servers, this field reports the number of times the server was switched away from. | ||
- name: connection.errors | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of requests that encountered an error trying to connect to a server. For backends, this field reports the sum of the stat for all backend servers, plus any connection errors not associated with a particular server (such as the backend having no active servers). | ||
- name: rate | ||
type: group | ||
fields: | ||
- name: value | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Number of HTTP requests per second over the last elapsed second. | ||
- name: max | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Maximum number of HTTP requests per second. | ||
- name: total | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Total number of HTTP requests received. | ||
- name: intercepted | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of intercepted requests. | ||
- name: response | ||
type: group | ||
fields: | ||
- name: errors | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of response errors. This value includes the number of data transfers aborted by the server (haproxy.stat.server.aborted). Some other errors are: | ||
* write errors on the client socket (won't be counted for the server stat) * failure applying filters to the response | ||
- name: time.avg | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Average response time in ms over the last 1024 requests (0 for TCP). | ||
- name: denied | ||
type: integer | ||
metric_type: counter | ||
description: | | ||
Responses denied because of security concerns. For HTTP this is because of a matched http-request rule, or "option checkcache". | ||
- name: http | ||
type: group | ||
fields: | ||
- name: 1xx | ||
type: long | ||
metric_type: counter | ||
description: | | ||
HTTP responses with 1xx code. | ||
- name: 2xx | ||
type: long | ||
metric_type: counter | ||
description: | | ||
HTTP responses with 2xx code. | ||
- name: 3xx | ||
type: long | ||
metric_type: counter | ||
description: | | ||
HTTP responses with 3xx code. | ||
- name: 4xx | ||
type: long | ||
metric_type: counter | ||
description: | | ||
HTTP responses with 4xx code. | ||
- name: 5xx | ||
type: long | ||
metric_type: counter | ||
description: | | ||
HTTP responses with 5xx code. | ||
- name: other | ||
type: long | ||
metric_type: counter | ||
description: | | ||
HTTP responses with other codes (protocol error). | ||
- name: header | ||
|
@@ -227,40 +266,48 @@ | |
fields: | ||
- name: total | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of failed header rewrite warnings. | ||
- name: session | ||
type: group | ||
fields: | ||
- name: current | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Number of current sessions. | ||
- name: max | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Maximum number of sessions. | ||
- name: limit | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Configured session limit. | ||
- name: total | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of all sessions. | ||
- name: rate | ||
type: group | ||
fields: | ||
- name: value | ||
type: integer | ||
metric_type: gauge | ||
description: | | ||
Number of sessions per second over the last elapsed second. | ||
- name: limit | ||
type: integer | ||
metric_type: gauge | ||
description: | | ||
Configured limit on new sessions per second. | ||
- name: max | ||
type: integer | ||
metric_type: gauge | ||
description: | | ||
Maximum number of new sessions per second. | ||
- name: check | ||
|
@@ -293,6 +340,7 @@ | |
Layer 5-7 code, if available. | ||
- name: duration | ||
type: long | ||
metric_type: gauge | ||
description: | | ||
Time in ms that it took to finish the last health check. | ||
- name: health.last | ||
|
@@ -306,15 +354,18 @@ | |
- name: agent.last | ||
type: integer | ||
- name: failed | ||
metric_type: counter | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a wrong type. Can we cross check?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know that it is a bug and hence i didn't assign any metric_type mapping to Bug reported here : #7202 |
||
type: long | ||
description: | | ||
Number of checks that failed while the server was up. | ||
- name: down | ||
type: long | ||
metric_type: counter | ||
description: | | ||
Number of UP->DOWN transitions. For backends, this value is the number of transitions to the whole backend being down, rather than the sum of the transitions for each server. | ||
- name: client.aborted | ||
type: integer | ||
metric_type: counter | ||
description: | | ||
Number of data transfers aborted by the client. | ||
- name: server | ||
|
@@ -326,14 +377,17 @@ | |
Server ID (unique inside a proxy). | ||
- name: aborted | ||
type: integer | ||
metric_type: counter | ||
description: | | ||
Number of data transfers aborted by the server. This value is included in haproxy.stat.response.errors. | ||
- name: active | ||
type: integer | ||
metric_type: gauge | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to cross check this is counter or gauge, since aborted and backup are counter for server group. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The mapping is |
||
description: | | ||
Number of backend servers that are active, meaning that they are healthy and can receive requests from the load balancer. | ||
- name: backup | ||
type: integer | ||
metric_type: gauge | ||
description: | | ||
Number of backend servers that are backup servers. | ||
- name: compressor | ||
|
@@ -342,21 +396,25 @@ | |
- name: in.bytes | ||
type: long | ||
format: bytes | ||
metric_type: counter | ||
description: | | ||
Number of HTTP response bytes fed to the compressor. | ||
- name: out.bytes | ||
type: integer | ||
format: bytes | ||
metric_type: counter | ||
description: | | ||
Number of HTTP response bytes emitted by the compressor. | ||
- name: bypassed.bytes | ||
type: long | ||
format: bytes | ||
metric_type: counter | ||
description: | | ||
Number of bytes that bypassed the HTTP compressor (CPU/BW limit). | ||
- name: response.bytes | ||
type: long | ||
format: bytes | ||
metric_type: counter | ||
description: | | ||
Number of HTTP responses that were compressed. | ||
- name: proxy | ||
|
@@ -383,6 +441,7 @@ | |
Configured queue limit (maxqueue) for the server, or nothing if the value of maxqueue is 0 (meaning no limit). | ||
- name: time.avg | ||
type: integer | ||
metric_type: gauge | ||
description: | | ||
The average queue time in ms over the last 1024 requests. | ||
- name: agent | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agithomas, Please cross check once if it is counter/gauge.
haproxy doc:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mapping is
MaP
, witha
indicating an average value. So, it is agauge
type.