[Q&A] Question about using relabel output as secondary and encrypting failed messages #5212
Unanswered
stagegrowth
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is a problem?
I want to securely store failed messages when delivery to the primary destination fails.
In our production environment, Fluentd receives HTTP requests and forwards them to an internal HTTP endpoint.
When delivery succeeds, logs are already encrypted using AWS KMS and stored according to our security policy.
However, when delivery fails, records are handled by a output and written to a file in plain text.
To avoid storing sensitive payloads in plain text, I attempted to route failed records through a separate encrypted processing pipeline.
Specifically, I tried to use @type relabel as a secondary output so that failed records could be routed to another label and encrypted before being written to a file.
This approach was ineffective, as Fluentd fails to start when relabel is configured as a secondary output.
Based on the error message, my understanding is that only supports buffered outputs and that relabel is non-buffered.
I would like to confirm whether this limitation is intentional and if there is any supported way to securely process failed records without storing them in plain text.
Describe the configuration of Fluentd
Fluentd is deployed on Kubernetes using a Helm chart and receives requests via an HTTP input.
High-level configuration:
To encrypt failed records before writing them to a file, I attempted to route secondary records using @type relabel and apply encryption logic in a dedicated label.
Relevant part of the configuration (simplified):
Encryption for successful deliveries and re-ingested error logs is already implemented using record_transformer with Ruby and AWS KMS, and works as expected outside of the secondary output path.
Describe the logs of Fluentd
When Fluentd is started with @type relabel configured as a secondary output, it fails during startup with the following error:
Environment
Beta Was this translation helpful? Give feedback.
All reactions