Add metric_type mapping to stat datastream of HA Proxy#7183
Add metric_type mapping to stat datastream of HA Proxy#7183agithomas merged 6 commits intoelastic:mainfrom
Conversation
🌐 Coverage report
|
| fields: | ||
| - name: total | ||
| type: long | ||
| metric_type: gauge |
There was a problem hiding this comment.
idle.total is it a counter instead?
There was a problem hiding this comment.
The schema definition is srv_icur.1:MGP. So, it is a gauge type.
There was a problem hiding this comment.
should it be named like idle.current instead?
There was a problem hiding this comment.
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.
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.
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.
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 |
| Status (UP, DOWN, NOLB, MAINT, or MAINT(via)...). | ||
| - name: weight | ||
| type: long | ||
| metric_type: gauge |
There was a problem hiding this comment.
@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.
The mapping is MaP, with a indicating an average value. So, it is a gauge type.
| - name: agent.last | ||
| type: integer | ||
| - name: failed | ||
| metric_type: counter |
There was a problem hiding this comment.
This looks like a wrong type. Can we cross check?
"check": { "agent.last": "", }
There was a problem hiding this comment.
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
| 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.
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.
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_typemapping to stat datastream of HA ProxyChecklist
changelog.ymlfile.How to test this PR locally
Related issues