Skip to content

Conversation

@neptunian
Copy link
Contributor

Resolves #79740

Summary

When the policy change is sent to the Elastic Agent it includes the fleet.kibana.hosts with the hosts having a prefix of http://. It should not send it in this format as that doesn't follow the same format shared by all beats.

It should send the hosts as:

fleet:
  kibana:
     protocol: 'http'
     hosts: ['localhost:5601']

It is currently sent as:

fleet:
  kibana:
     hosts: ['http://localhost:5601']

Change

Separate the host from the url during creation of the full agent policy

@neptunian neptunian added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.10.0 Team:Fleet Team label for Observability Data Collection Fleet team labels Oct 6, 2020
@neptunian neptunian requested a review from a team as a code owner October 6, 2020 22:05
@neptunian neptunian requested a review from a team October 6, 2020 22:05
@neptunian neptunian requested a review from a team as a code owner October 6, 2020 22:05
@neptunian neptunian self-assigned this Oct 6, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@neptunian neptunian merged commit 041dfdd into elastic:master Oct 6, 2020
neptunian added a commit to neptunian/kibana that referenced this pull request Oct 6, 2020
@neptunian neptunian deleted the 79740-fix-kibana-url-send-to-agent branch October 6, 2020 23:42
throw new Error('kibana_urls is missing');
const hostsWithoutProtocol = settings.kibana_urls.map((url) => {
const parsedURL = new URL(url);
return `${parsedURL.host}${parsedURL.pathname !== '/' ? parsedURL.pathname : ''}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neptunian I'm not sure why this uses pathname in addition to host? Isn't host (hostname + port) enough? I believe it would match the examples added in the tests.

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

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.10.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet] Kibana hosts sent in policy config should not include the protocol

6 participants