Skip to content
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

[Fleet] Better default value for config kibana host and elasticsearch host #64513

Closed
nchaulet opened this issue Apr 27, 2020 · 3 comments · Fixed by #65366
Closed

[Fleet] Better default value for config kibana host and elasticsearch host #64513

nchaulet opened this issue Apr 27, 2020 · 3 comments · Fixed by #65366
Assignees
Labels
Ingest Management:alpha1 Group issues for ingest management alpha1 Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@nchaulet
Copy link
Member

Description

Currently the default value for the default output hosts rely on xpack.ingestManager.elasticsearch.hosts (you can edit this in the UI after).

Let see if we can find a better default value, maybe from the kbn config elasticsearch.hosts.

Related to #64276

@nchaulet nchaulet added Team:Fleet Team label for Observability Data Collection Fleet team Ingest Management:alpha1 Group issues for ingest management alpha1 labels Apr 27, 2020
@jfsiii
Copy link
Contributor

jfsiii commented Apr 30, 2020

I spoke with @joshdover and he said

For elasticsearch.hosts there is a possible need to expose this to plugins. One known case is the Console application needs these configs. We currently expose this API to legacy, but not currently to NP plugins.

For Kibana’s server.host we don’t currently have a reliable way of knowing whether or not this is the public available hostname. There have been discussions about adding a publicAddress type configuration, but no decision moving forward on that yet.

So I think we'll have continue being creative

@jfsiii
Copy link
Contributor

jfsiii commented Apr 30, 2020

Pulling together a few Slack conversations:

There's a cloud Kibana plugin which exports isCloudEnabled and cloudId.

CloudId contains the ES and Kibana URLs.

We found this code which decodes it into the various parts https://github.com/elastic/beats/blob/master/libbeat/cloudid/cloudid.go

We'll duplicate the required parts inTS, then implement like "if cloud enabled and have cloud is, derive both URLs from cloud id. Otherwise, use xpack.ingestManager.* values. Otherwise use defaults".

@jfsiii will do the TS code and test/work with Cloud

@jfsiii
Copy link
Contributor

jfsiii commented May 4, 2020

Worked on this today. No time to push to draft yet, but if anyone needs to convert a CloudID string into the ES & Kibana URLs, this decodeCloudID should work. TS Playground link (click Run & look in console for passing tests)

I ported from https://github.com/elastic/beats/blob/master/libbeat/cloudid/cloudid.go & https://github.com/elastic/beats/blob/master/libbeat/cloudid/cloudid_test.go

I'll get up something more appropriate soon, but I just wanted to make this available for anyone currently waiting on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ingest Management:alpha1 Group issues for ingest management alpha1 Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants