-
Notifications
You must be signed in to change notification settings - Fork 1.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
http_in returns internal server error if a field "time" is provided as a string #3036
Comments
see #2591 There is no problem in the submission of the event, your problem is likely with the output instead. The issue is likely with output buffering, it seems to confuse it when you specify buffering by time, as it does not know which "time" you mean ("time" means both event time and record field "time") However, if "time" is actual time of the transaction, you can you |
@mlasevich I investigated the issue a bit and did confirm the 500 error came from The other issue would probably result in |
Ahh, that seems to be something specific to |
Also, check your parser config, but default parser_json uses "time" as |
@mlasevich I've already fixed this myself, but I opened the issue for the benefit of others. My request here are (1) that it return error 400 with an appropriate message and (2) this feature / limitation is actually mentioned in the documentation. Even just (2) might be enough to save others the time I spent debugging. |
While the docs leave much to be desired, but I am not sure they would understand what you are asking for. FWIW, still do not |
Signed-off-by: Masahiro Nakagawa <[email protected]>
For docs, I'm thinking something like this: |
Although the change noted above might obsolete my docs suggestion as it adds a whole new feature for parsing the time. |
Keep in mind, if I understand it correctly(and it is a significant |
Based on e.g. https://github.com/fluent/fluentd/pull/3046/files#diff-9c1e429b7574065cdb9677d43880606dR208 I would say that it is parsing the time field of the records in the request body. |
Right, which is normally done in a parser plugin and not in the input itself - and it seems to be indicated the configuration of the test, since test is explicitly configuring the parser plugin a few lines above. But apparently it is ALSO processing it in the input. No wonder it is a mess- there are multiple plugins trying to do the same work with separate/competing configurations :-( |
This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days |
This issue was automatically closed because of stale in 30 days |
Describe the bug
When submitting logs to the http input, if the logs contain a
time
field that isn't a floating point seconds since the epoch, a status 500 is returned. I think it should return a status 400 instead, if the data is not valid.Further, there's nothing mentioned in the documentation that the field
time
inside a log record has any special significance or constraint upon it.time
is only documented as a query parameter.To Reproduce
Just for example:
This causes an internal server error parsing the "time" field. The error message is returned to the client with status 500 "internal server error".
Furthermore, observe that the documentation does not mention the special nature of the
time
field in a log record.Expected behavior
A status 400 should be returned to indicate it was supposedly the client that made the mistake.
Additionally, the documentation should describe the usage and restrictions of the
time
field of log records submitted to the http input.Your Environment
fluentd (1.11.0) running in kubernetes using the docker debian image.
The text was updated successfully, but these errors were encountered: