Skip to content
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

Elastic /_bulk API response missing items array #607

Open
awesense-paul opened this issue Jan 13, 2025 · 7 comments
Open

Elastic /_bulk API response missing items array #607

awesense-paul opened this issue Jan 13, 2025 · 7 comments

Comments

@awesense-paul
Copy link

The elastic bulk API HTTP response contains an array field "items" (which includes the full documents that were inserted), but qryn does not include that field.

(I am using rsyslog w/omelasticsearch output module, and it logs a warning that the items[] array is missing. For my purposes, the response only needs to contain an empty array to avoid the warning)

@lmangani
Copy link
Collaborator

Is this a recent requirement? I do not recall this being mandatory for clients inserting data

@awesense-paul
Copy link
Author

awesense-paul commented Jan 13, 2025

It appears in the the 7.17 docs (maybe earlier versions too? that's just the oldest I could find on the Elastic site)

https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docs-bulk.html#bulk-api-response-body

I'm not sure how many clients actually require it. rsyslog seems to be fine with just an empty array. tbh it seems... kinda wasteful to have an API returning [aspects/portions of] the data that was in the request anyway? For my use-case, I'm just trying to get rsyslog to complain less.

@lmangani
Copy link
Collaborator

Indeed this sounds like as horrible as anything Elastic. My personal take is returning an empty array would be worse than returning nothing as it would suggest no action was performed potentially leading the client into repeating the bulk insertion. Out of curiosity have you considered just using one of the other log insertion methods without such silly requirements? The results are the same when querying data back.

@awesense-paul
Copy link
Author

That is a good point w.r.t. returning empty array.

I do wonder whether I could get logs going into a metrico/otel-collector via a different protocol, that might actually handle the load better anyway. I'll try that instead (though this issue may still remain valid, just less important)

@lmangani
Copy link
Collaborator

@awesense-paul IMHO vector does fantastic with qryn logs and its one of the lighter agents out there

@awesense-paul
Copy link
Author

Taking a look! Can it insert directly into CH? Or do you typically use the Loki sink (or other qryn-supported protocol)?

@lmangani
Copy link
Collaborator

For most agents using a loki sink with bulking works great - using direct CH ingestion really only makes a noticeable difference at huge volumes but I'm curious to know what you end up choosing and happy to assist if we can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants