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

[Feature Request] provide an option to disable messages sent to ERROR #37

Open
1 task done
ryn9 opened this issue Mar 19, 2022 · 5 comments
Open
1 task done

[Feature Request] provide an option to disable messages sent to ERROR #37

ryn9 opened this issue Mar 19, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@ryn9
Copy link

ryn9 commented Mar 19, 2022

(check apply)

Is your feature request related to a problem? Please describe.

In environment's with high rates of poorly constructed messages, where OpenSearch is rejected many messages, the plugin will flood out logging about the 4xx events for each poorly constructed message.

While log_os_400_reason is available to tune down the verbosity of the individual messages, it still makes an error log for each message rejected by OpenSearch

example:
2022-03-19 16:59:08 +0000 [warn]: #0 send an error event to @ERROR: error_class=Fluent::Plugin::OpenSearchErrorHandler::OpenSearchError error="400 - Rejected by OpenSearch" location=nil tag="" time=2022-03-19 16:59:06.948702500 +0000

Describe the solution you'd like

provide an option to disable messages sent to ERROR (or if considering this feature request, wherever the message is sent to)

Describe alternatives you've considered

Tried tuning down messages from the plugin using the system ignore_repeated_log_interval and ignore_same_log_interval options, but those did not stop any of the aforementioned messages. That is probably due to each message having a unique timestamp, etc..

@cosmo0920
Copy link
Collaborator

I send a PR to suppress error label log in #38.

@cosmo0920 cosmo0920 added the enhancement New feature or request label Mar 22, 2022
@ryn9
Copy link
Author

ryn9 commented Mar 22, 2022

@cosmo0920 - thank you, I believe the 'emit_error_label_event' option you are adding will be a helpful option.

That said, is there a way to keep messages flowing to ERROR, but without printing the send an error event to @ERROR to fluentd's log?

@cosmo0920
Copy link
Collaborator

cosmo0920 commented Mar 23, 2022

send an error event to @ERROR is sent from router#emit_error_event itself:
https://github.com/fluent/fluentd/blob/master/lib/fluent/root_agent.rb#L348

Unfortunately, there is no way to suppress this warn message.

@vishalmamidi
Copy link

@cosmo0920 will it be possible to redirect "Rejected by OpenSearch" log or record which got rejected from OpenSearch to be saved in other indices or some other place in case those logs are important and can't risk losing them

@ryn9
Copy link
Author

ryn9 commented Apr 5, 2022

@vishalmamidi - I am asking for something similar in #36, if you would like to take a look....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants