-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add custom headers #267
Add custom headers #267
Conversation
Hey @cjgibson, thank you for your contribution. |
No rush - feel free to wait until after the coming holiday season! |
Hello, hello, checking in again now that the holiday season has wrapped - any chance I could get a review @harshit-splunk? |
New week, new bump - any ETA here @harshit-splunk ? |
Thank you @harshit-splunk! Sorry for all the pings 😁 |
@cjgibson sorry for the delay. We are planning to deprecate this project soon in favour of https://github.com/signalfx/splunk-otel-collector-chart. |
Hahahah - oh no! I'll warn the Humio folks. Does that mean Splunk is dropping support for Fluentd entirely? |
Most probably yes. I'll have to confirm it with the PM. |
Proposed changes
We do something particularly silly, and run a CloudStrike Falcon LogScale instance (nee Humio) behind a Kubernetes Ingress on one of our clusters that we'd like to emit logs to via Fluentd from various other Kubernetes clusters. In order to traverse that Ingress, we need to present a custom Authorization header alongside our requests. This PR adds support for a new configuration parameter,
custom_headers
, that is used to populate theoverride_headers
Hash used in requests made by this plugin.For context here, prior to the Elasticsearch 8.0.0 release Humio recommended using Fluentd's
elasticsearch
output plugin for use in relaying logs for ingest, but now recommends use of thissplunk_hec
output plugin instead. Saidelasticsearch
output plugin supported a virtually identicalcustom_headers
configuration block, which we used for this purpose.It's been ages since I wrote much Ruby anything, but I've attempted to add relevant tests in-line with the existing tests I see in this repository, and
make unit-test
runs without issue for me - but please let me know if there's something else I should test, or some better way to go around adding this functionality. (I noticed the exposedproxy_from_env
hook, but wasn't sure if that could be leveraged for this use-case.)Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply.