-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/haproxy] failed to parse int64 for HaproxyRequestsTotal, value was : strconv.ParseInt: parsing \"\": invalid syntax;
#30252
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I have tried to run with your CSV but I get errors that the number of fields on line 4 doesn't match. I will use an other approach to reproduce. |
@atoulme Just remember that the HAProxy receiver appends that I just tried again and the above specified stats file works fine "on my machine" ™️ 😉 |
No such luck for me. Please review my fix: #30269 |
**Description:** support haproxy stats displaying empty values. **Link to tracking Issue:** Fixes #30252 **Testing:** Add an integration test with a record with empty values.
**Description:** support haproxy stats displaying empty values. **Link to tracking Issue:** Fixes open-telemetry#30252 **Testing:** Add an integration test with a record with empty values.
Component(s)
receiver/haproxy
What happened?
Description
My client has a HAProxy instance and is using the HAProxy receiver to scrape metrics from the HAProxy v2.8 stats endpoint. The receiver scrapes most metrics correctly, but it throws errors for rows that don't have values set for the following columns:
hrsp_1xx
,hrsp_2xx
,hrsp_3xx
,hrsp_4xx
,hrsp_5xx
,hrsp_other
.Upon closer inspection of the stats dump file (see below), I noticed that the rows that don't have values set for these columns have
mode
column set totcp
and nothttp
, which probably explains the lack of HTTP status code stats.I would expect the receiver to not throw errors in this case, as it seems to be an expected behavior of the HAProxy stats page to not provide HTTP status stats for non-HTTP services.
Steps to Reproduce
python3 -m http.server
in the directory where the file namedhapee-stats-redacted;csv
exists (note the ";csv" suffix).hapee-stats-redacted;csv
The above stats file is a dump of an actual stats page from my client's HAProxy, only slightly redacted for clarity - removed a bunch of irrelevant services (rows) and changed the client's domain name to "example.com".
The above stats file contains eleven non-HTTP (TCP) services. This results with one error message per every scrape, containing 66 = 11 * 6 errors complaining about not being able to parse an empty string into an integer value.
Expected Result
No errors are reported by the receiver.
Actual Result
An error is reported on every scrape, see below for the log output.
Collector version
v0.91.0
Environment information
No response
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: