You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the haproxy receiver to collect metrics from an haproxy via unix socket, the otel collector spits the following error message:
2024-04-10T01:19:24.122Z error scraperhelper/scrapercontroller.go:197 Error scraping metrics {"kind": "receiver", "name": "haproxy", "data_type": "metrics", "error": "record on line 21: wrong number of fields", "scraper": "haproxy"}
I believe it is because the command sent is show stats, whereas according to the haproxy doc it should be "show stat" (singular).
When I manually use "show stats", haproxy gives an error message:
$ echo 'show stats' | socat /run/haproxy/admin.sock stdio
Unknown command. Please enter one of the following commands only :
help : this message
prompt : toggle interactive mode with prompt
quit : disconnect
...
**Description:**
Fix an issue where we called `show stats` instead of `show stat`.
This also fixes the situation where no records are present by properly
trimming the data.
**Link to tracking Issue:**
Fixes#32291
**Testing:**
Added a unit test.
Component(s)
receiver/haproxy
What happened?
Description
When using the haproxy receiver to collect metrics from an haproxy via unix socket, the otel collector spits the following error message:
I believe it is because the command sent is
show stats
, whereas according to the haproxy doc it should be "show stat
" (singular).When I manually use "show stats", haproxy gives an error message:
but "show stat" works:
Steps to Reproduce
Setup a basic haproxy
Configure a basic otel collector with haproxy receiver:
Expected Result
Successfully collect stats from haproxy.
Actual Result
I get the following error from otel collector with both haproxy 1.8.8 and 2.0.33:
Collector version
0.97.0
Environment information
Environment
Ubuntu 20.04.6 LTS
haproxy 2.0.33-0ubuntu0.1
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: