Skip to content

libbeat: log debug for proxy_url and fixed docs#31130

Merged
belimawr merged 1 commit into
elastic:mainfrom
belimawr:proxy_url_docs_and_logs
Apr 12, 2022
Merged

libbeat: log debug for proxy_url and fixed docs#31130
belimawr merged 1 commit into
elastic:mainfrom
belimawr:proxy_url_docs_and_logs

Conversation

@belimawr

@belimawr belimawr commented Apr 4, 2022

Copy link
Copy Markdown
Member

What does this PR do?

Fixes the documentation regarding Elasticsearch output proxy_url
configuration format.

Debug logs are added with the breakdown of proxy_url.

Why is it important?

Our documentation did not mach the way proxy_url is parsed for Elasticsearch output.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

## Author's Checklist

How to test this PR locally

Add the proxy_url setting to any output that supports it, start a Beat with log debug, look for the log message breaking down the proxy URL that look like this:

{"log.level":"debug","@timestamp":"2022-04-04T18:05:42.644+0200","log.logger":"elasticsearch","log.origin":{"file.name":"elasticsearch/elasticsearch.go","file.line":68},"message":"breaking down proxy URL. Scheme: 'https', host[:port]: 'my-proxy.proxy:8888', path: '/proxy/path'","service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2022-04-04T18:05:42.644+0200","log.logger":"elasticsearch","log.origin":{"file.name":"elasticsearch/elasticsearch.go","file.line":69},"message":"Using proxy URL: https://my-proxy.proxy:8888/proxy/path","service.name":"filebeat","ecs.version":"1.6.0"}

Configuration example:

output.elasticsearch:
  enabled: true
  hosts: ["localhost:9200"]
  proxy_url: "https://my-proxy.proxy:8888/proxy/path"

Related issues

## Use cases
## Screenshots
## Logs

Fixes the documentation regarding Elasticsearch output `proxy_url`
configuration format.

Debug logs are added with the breakdown of `proxy_url`.

Closes elastic#29249
@belimawr belimawr added docs Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team backport-v8.3.0 Automated backport with mergify backport-7.17 Automated backport to the 7.17 branch with mergify labels Apr 4, 2022
@belimawr belimawr requested a review from a team as a code owner April 4, 2022 16:11
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic Bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Apr 4, 2022
@elasticmachine

elasticmachine commented Apr 4, 2022

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-04-06T14:51:50.248+0000

  • Duration: 52 min 15 sec

Test stats 🧪

Test Results
Failed 0
Passed 16865
Skipped 1881
Total 18746

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@belimawr

belimawr commented Apr 6, 2022

Copy link
Copy Markdown
Member Author

/test

@belimawr

Copy link
Copy Markdown
Member Author

This is just a documentation and log debug PR, I won't fix the issues the linter is pointing out because they're were already there and I don't want to change the existing code at the moment.

@belimawr belimawr merged commit 2b26691 into elastic:main Apr 12, 2022
mergify Bot pushed a commit that referenced this pull request Apr 12, 2022
Fixes the documentation regarding Elasticsearch output `proxy_url`
configuration format.

Debug logs are added with the breakdown of `proxy_url`.

Closes #29249

(cherry picked from commit 2b26691)
belimawr added a commit that referenced this pull request Apr 12, 2022
Fixes the documentation regarding Elasticsearch output `proxy_url`
configuration format.

Debug logs are added with the breakdown of `proxy_url`.

Closes #29249

(cherry picked from commit 2b26691)

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
v1v added a commit to v1v/beats that referenced this pull request Apr 18, 2022
…er-tar-gz

* upstream/main: (139 commits)
  [Automation] Update elastic stack version to 8.3.0-c655cda8 for testing (elastic#31322)
  Define a queue metrics reporter interface  (elastic#31289)
  [Oracle Module] Change tablespace metricset collection period (elastic#31259)
  libbeat/reader/syslog: relax timestamp parsing to allow leading zero (elastic#31254)
  [Automation] Update elastic stack version to 8.3.0-55ba6f37 for testing (elastic#31311)
  [libbeat] Remove unused fields and functions in the memory queue (elastic#31302)
  [libbeat] Cleaning up some unneeded helper types (elastic#31290)
  Readme for kibana module (elastic#31276)
  [Automation] Update elastic stack version to 8.3.0-4be61f32 for testing (elastic#31296)
  x-pack/winlogbeat/module/routing/ingest: fix typo for channel name (elastic#31291)
  Small pipeline cleanup removing some unused data fields (elastic#31288)
  removing info log (elastic#30971)
  Simplify TLS config deserialization (elastic#31168)
  Detect new files under known paths in filestream input (elastic#31268)
  Add support for port mapping in docker hints (elastic#31243)
  Update qa-labels.yml (elastic#31260)
  libbeat: log debug for `proxy_url` and fixed docs (elastic#31130)
  [heartbeat][docs] Add note about ensuring correct index settings for uptime (elastic#31146)
  [Automation] Update elastic stack version to 8.3.0-2c8f9574 for testing (elastic#31256)
  [Filebeat] fix m365_defender pipeline bug (elastic#31227)
  ...
kush-elastic pushed a commit to kush-elastic/beats that referenced this pull request May 2, 2022
Fixes the documentation regarding Elasticsearch output `proxy_url`
configuration format.

Debug logs are added with the breakdown of `proxy_url`.

Closes elastic#29249
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
Fixes the documentation regarding Elasticsearch output `proxy_url`
configuration format.

Debug logs are added with the breakdown of `proxy_url`.

Closes #29249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.3.0 Automated backport with mergify docs libbeat Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proxy_url for Elasticsearch output (and possible others) is parsed wrong when scheme is not provided.

3 participants