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

[New Platform] APIs needed for opening a connection to the Kibana server #56231

Closed
tsullivan opened this issue Jan 28, 2020 · 7 comments · Fixed by #56636
Closed

[New Platform] APIs needed for opening a connection to the Kibana server #56231

tsullivan opened this issue Jan 28, 2020 · 7 comments · Fixed by #56636
Labels
blocker Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@tsullivan
Copy link
Member

tsullivan commented Jan 28, 2020

Kibana Reporting plugin opens a headless browser to navigate / authenticate with the running Kibana web server to display visualizations for screenshot capture.

In order for the connection to establish, the plugin needs to form a complete URL of the kibana web service, using:

  • server protocol (http or https)
  • server host
  • server port

Reporting also tags the queued jobs with metadata about the running instance:

  • server name
  • server uuid

Also, the path.data config needs to be available to Reporting plugin somehow.

@tsullivan tsullivan added Feature:New Platform enhancement New value added to drive a business result labels Jan 28, 2020
@tsullivan tsullivan added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Jan 28, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@joshdover joshdover added blocker and removed enhancement New value added to drive a business result labels Jan 28, 2020
@tsullivan
Copy link
Member Author

server uuid

I found where this is available from coreSetup.uuid.getInstanceUuid. Thanks! :)

@tsullivan
Copy link
Member Author

Added a note to the description about the need for path.data

@pgayvallet
Copy link
Contributor

path.data is already available on PluginInitializerContext

    const legacyConfig = await this.initializerContext.config.legacy.globalConfig$
      .pipe(take(1))
      .toPromise();
    const dataPath = legacyConfig.path.data

this is a temporary solution, but will not be removed until we expose it in another way, and therefor should be used if you need to.

@pgayvallet
Copy link
Contributor

pgayvallet commented Jan 31, 2020

@restrry Does an API from httpSetup like getServerInfo returning a subset of the http config values would make sense to you?

getServerInfo() => { host: string, name: string, port: string, others? }

Also do you know where to retrieve the protocol (http or https) from the http config? I don't see it directly mentioned in src/core/server/http/http_config.ts. Can it be deduced from ssl.enabled ?

@mshustov
Copy link
Contributor

mshustov commented Feb 3, 2020

@tsullivan
Copy link
Member Author

Hi, it looks like I should open a separate issue for path.data.

Filed: #56760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants