chore: Accept 204 from FluentD responses#57158
chore: Accept 204 from FluentD responses#57158cgetzen wants to merge 2 commits intogravitational:masterfrom
Conversation
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
|
From the docs for the Fluentd HTTP input plugin:
It seems future versions of Fluentd will also respond with a 204, so we should definitely allow at least 200 and 204. I'll let our devs comment on whether we want to accept all 2XX response codes or not. |
|
@programmerq nice find. This has been adjusted to only accept 200 and 204. |
|
recheck |
I am not sure if this, or the "CLA Assistant" CI check, is working correctly. |
|
Hey, change looks good to me. I'll go ahead and approve the GHA workflows and add the PR to the merge queue. I'll also follow up with the backport PRs. Edit: Seems like our CI pipeline is having some issues with external contributions. I've created a buddy PR with your commits here: #57581. |
|
Merged in: #57581 |
Problem
Many orgs already have logging infrastructure in place, but do not use FluentD. In this case, Teleport Audit Event Logging requires teams to install and manage FluentD in addition to existing infra.
Solution
This relaxes the status code validation for FluentD responses, in order to allow other log aggregators to accept the event handlers requests.
The changes in this PR allow Grafana Alloy to be used as a replacement for FluentD, by using the loki.sources.api component and configuring the Teleport event handler to point
urlandsession-urlto Alloy's/loki/api/v1/rawendpoint.This change should accommodate any Log Collectors that support raw JSON and emit 200 or 204 status codes.
Without these changes in place, logs get duplicated in our logging infra: