Conversation
Contributor
Author
|
Cherry-pick of af5d23e has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
9 tasks
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
Contributor
Author
|
This pull request is now in conflicts. Could you fix it? 🙏 |
b914881 to
c5dabdd
Compare
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @zmoog? 🙏 |
…cessor v2 (#47956) Support for AMQP-over-WebSocket transport in the azure-eventhub processor v2. Enterprise users often need to comply with network restrictions, which means using AMQP may not be an option. In addition to AMQP-over-WebSocket support, this change allows users to run the azure-eventhub input behind an HTTPS proxy. (cherry picked from commit af5d23e) # Conflicts: # x-pack/filebeat/input/azureeventhub/auth.go # x-pack/filebeat/input/azureeventhub/config.go # x-pack/filebeat/input/azureeventhub/v2_input.go # Conflicts: # go.mod # x-pack/filebeat/input/azureeventhub/auth.go # x-pack/filebeat/input/azureeventhub/config.go # x-pack/filebeat/input/azureeventhub/v2_input.go
c5dabdd to
bee7a94
Compare
zmoog
approved these changes
Dec 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Support for AMQP-over-WebSocket transport in the azure-eventhub processor v2.
Enterprise users often need to comply with network restrictions, which means using AMQP may not be an option.
In addition to AMQP-over-WebSocket support, this change allows users to run the azure-eventhub input behind an HTTPS proxy.
Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
No disruptive user impact. The input still defaults to AMQP transport, and unless users switch to WS transport, the behavior is unchanged.
Author's Checklist
How to test this PR locally
I used the following Filebeat config:
Here are a couple of vscode configuration to test the WebSocket-only and WebSocket with HTTPS proxy scenarios (make sure to replace the placeholders
YOUR * GOES HEREwith actual values).WebSocket only
{ "version": "0.2.0", "configurations": [ { "name": "Launch Filebeat", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}/x-pack/filebeat/main.go", "args": [ "-e", "-v", "-d", "*", "--strict.perms=false", "--path.home", "${workspaceFolder}/x-pack/filebeat", "-E", "cloud.id=<YOUR CLOUD ID GOES HERE>", "-E", "cloud.auth=<YOUR USERNAME GOES HERE>:<YOUR PASSWORD GOES HERE>", "-E", "gc_percent=100", "-E", "setup.ilm.enabled=false", "-E", "setup.template.enabled=false", "-E", "output.elasticsearch.allow_older_versions=true" ], "env": { "EVENTHUB_NAME": "logs", "EVENTHUB_CONNECTION_STRING": "<YOUR EVENT HUB CONNECTION STRING GOES HERE>", "EVENTHUB_CONSUMER_GROUP": "$Default", "STORAGE_ACCOUNT": "<YOUR STORAGE ACCOUNT NAME GOES HERE>", "STORAGE_ACCOUNT_KEY": "<YOUR STORAGE ACCOUNT KEY GOES HERE>", "STORAGE_ACCOUNT_CONNECTION_STRING": "<YOUR STORAGE ACCOUNT CONNECTION STRING GOES HERE>", "PROCESSOR_VERSION": "v2", "MIGRATE_CHECKPOINT": "true", "TRANSPORT": "websocket" } } ] }WebSocket with HTTPS proxy
{ "version": "0.2.0", "configurations": [ { "name": "Launch Filebeat", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}/x-pack/filebeat/main.go", "args": [ "-e", "-v", "-d", "*", "--strict.perms=false", "--path.home", "${workspaceFolder}/x-pack/filebeat", "-E", "cloud.id=<YOUR CLOUD ID GOES HERE>", "-E", "cloud.auth=<YOUR USERNAME GOES HERE>:<YOUR PASSWORD GOES HERE>", "-E", "gc_percent=100", "-E", "setup.ilm.enabled=false", "-E", "setup.template.enabled=false", "-E", "output.elasticsearch.allow_older_versions=true" ], "env": { "EVENTHUB_NAME": "logs", "EVENTHUB_CONNECTION_STRING": "<YOUR EVENT HUB CONNECTION STRING GOES HERE>", "EVENTHUB_CONSUMER_GROUP": "$Default", "STORAGE_ACCOUNT": "<YOUR STORAGE ACCOUNT NAME GOES HERE>", "STORAGE_ACCOUNT_KEY": "<YOUR STORAGE ACCOUNT KEY GOES HERE>", "STORAGE_ACCOUNT_CONNECTION_STRING": "<YOUR STORAGE ACCOUNT CONNECTION STRING GOES HERE>", "PROCESSOR_VERSION": "v2", "MIGRATE_CHECKPOINT": "true", "TRANSPORT": "websocket", "HTTP_PROXY": "http://127.0.0.1:9090", "HTTPS_PROXY": "http://127.0.0.1:9090" } } ] }To test the proxy support, I used mitmproxy, an interactive HTTPS proxy with request inspection:
Since the Azure services require using an HTTPS proxy, you also need to set up a certificate for mitmproxy. See https://docs.mitmproxy.org/stable/concepts/certificates/ fore more details.
The mitmproxy main view:
Upgrade to AMQP-over-WebSocket:
WebSocket details:
Event hub messages received using AMQP-over-websocket through the proxy:
Related issues
Use cases
This is an automatic backport of pull request #47956 done by [Mergify](https://mergify.com).