-
Notifications
You must be signed in to change notification settings - Fork 444
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
Add metric_type mapping to stat datastream of HA Proxy #7183
Conversation
🌐 Coverage report
|
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
The schema definition is srv_icur.1:MGP
. So, it is a gauge type.
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.
should it be named like idle.current instead?
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.
Yes, it would have been optimal. The description goes as Current number of idle connections available for reuse on this server
.
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.
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 comment
The 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.
"idle": {},
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.
I generated some traffic to populate the value for idle
. Please find the extract from the document below
"connection": {
"reuse.total": 7,
"retried": 0,
"cache": {},
"idle": {
"total": 1
},
"attempt.total": 290,
"time.avg": 1
},
"queue": {
"time.avg": 0
},
"status": "UP",
"client.aborted": 1,
"compressor": {}
}
@agithomas, Can you share a sample "stat" document to cross-check the metric types once? |
{
"haproxy": {
"stat": {
"server": {
"id": 0
},
"request": {
"total": 0,
"rate": {
"max": 0,
"value": 0
},
"denied_by_connection_rules": 0,
"denied_by_session_rules": 0,
"denied": 0,
"intercepted": 0,
"errors": 0
},
"agent": {
"fall": "",
"health": "",
"description": "",
"check": {
"health": "",
"description": "",
"rise": ""
},
"rise": "",
"status": ""
},
"cookie": "",
"session": {
"current": 0,
"total": 0,
"max": 0,
"rate": {
"max": 0,
"limit": 0,
"value": 0
},
"limit": 524262
},
"service_name": "FRONTEND",
"in.bytes": 0,
"source": {
"address": ""
},
"check": {
"agent.last": "",
"health.last": "",
"status": ""
},
"out.bytes": 0,
"proxy": {
"mode": "http",
"name": "stats",
"id": 2
},
"component_type": 0,
"response": {
"http": {
"1xx": 0,
"2xx": 0,
"other": 0,
"3xx": 0,
"4xx": 0,
"5xx": 0
},
"denied": 0
},
"load_balancing_algorithm": "",
"header": {
"rewrite": {
"failed": {
"total": 0
}
}
},
"connection": {
"total": 0,
"cache": {
"hits": 0,
"lookup.total": 0
},
"rate": 0,
"idle": {},
"rate_max": 0
},
"queue": {},
"status": "OPEN",
"compressor": {
"response.bytes": 0,
"in.bytes": 0,
"bypassed.bytes": 0,
"out.bytes": 0
}
}
}
} |
Document extract after traffic inflow
|
@@ -7,10 +7,12 @@ | |||
Status (UP, DOWN, NOLB, MAINT, or MAINT(via)...). | |||
- name: weight | |||
type: long | |||
metric_type: gauge |
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:
- weight [..BS]: total effective weight (backend), effective weight (server)
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
, with a
indicating an average value. So, it is a gauge
type.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a wrong type. Can we cross check?
"check": { "agent.last": "", }
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.
I know that it is a bug and hence i didn't assign any metric_type mapping to check.agent.last
field.
Bug reported here : #7202
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
The mapping is SGP
. So, it is a gauge type
…githomas/integrations into issue-7138-haproxy-metric-stat
@lalit-satapathy , can you please approve if all looks good? |
Package haproxy - 1.8.1 containing this change is available at https://epr.elastic.co/search?package=haproxy |
Type of Change
What does this PR do?
Add
metric_type
mapping to stat datastream of HA ProxyChecklist
changelog.yml
file.How to test this PR locally
Related issues