Skip to content

Commit

Permalink
[8.11] [Reporting] update logs and docs on headless browser connection (
Browse files Browse the repository at this point in the history
elastic#179882) (elastic#179952)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[Reporting] update logs and docs on headless browser connection
(elastic#179882)](elastic#179882)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tim
Sullivan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-04-03T15:15:12Z","message":"[Reporting]
update logs and docs on headless browser connection (elastic#179882)\n\n##
Summary\r\n\r\nThis resolves some issues we've seen over confusion on
configuration and\r\nrefused access to Kibana while generating a PNG/PDF
report.","sha":"982303882ed979add12b5f60288ef46975446869","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","docs","v8.11.0","v8.12.0","v8.13.0","v8.14.0"],"number":179882,"url":"https://github.com/elastic/kibana/pull/179882","mergeCommit":{"message":"[Reporting]
update logs and docs on headless browser connection (elastic#179882)\n\n##
Summary\r\n\r\nThis resolves some issues we've seen over confusion on
configuration and\r\nrefused access to Kibana while generating a PNG/PDF
report.","sha":"982303882ed979add12b5f60288ef46975446869"}},"sourceBranch":"main","suggestedTargetBranches":["8.11","8.12","8.13"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.13","label":"v8.13.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","labelRegex":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/179882","number":179882,"mergeCommit":{"message":"[Reporting]
update logs and docs on headless browser connection (elastic#179882)\n\n##
Summary\r\n\r\nThis resolves some issues we've seen over confusion on
configuration and\r\nrefused access to Kibana while generating a PNG/PDF
report.","sha":"982303882ed979add12b5f60288ef46975446869"}}]}]
BACKPORT-->

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
tsullivan and kibanamachine authored Apr 23, 2024
1 parent 95f8ec5 commit 627d7e6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 33 deletions.
71 changes: 43 additions & 28 deletions docs/setup/configuring-reporting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,13 @@ For security, you grant users access to the {report-features} and secure the rep
with TLS/SSL encryption. Additionally, you can install graphical packages into the operating system
to enable the {kib} server to have screenshotting capabilities.

* <<install-reporting-packages>>
* <<grant-user-access>>
* <<reporting-roles-user-api>>
* <<grant-user-access-basic>>
* <<grant-user-access-external-provider>>
* <<securing-reporting>>

[float]
[[install-reporting-packages]]
=== Install the reporting packages

Make sure the {kib} server operating system has the appropriate packages installed for the distribution.

If you are using RHEL operating systems, install the following packages:

* `ipa-gothic-fonts`
* `xorg-x11-fonts-100dpi`
* `xorg-x11-fonts-75dpi`
* `xorg-x11-utils`
* `xorg-x11-fonts-cyrillic`
* `xorg-x11-fonts-Type1`
* `xorg-x11-fonts-misc`
* `fontconfig`
* `freetype`

If you are using Ubuntu/Debian systems, install the following packages:

* `fonts-liberation`
* `libfontconfig1`
* `libnss3`

The reporting plugin has a built-in utility to check for common issues, such as missing dependencies. See
<<reporting-diagnostics>> for more information.
* <<install-reporting-packages>>
* <<set-reporting-server-host>>

[float]
[[grant-user-access]]
Expand Down Expand Up @@ -231,3 +205,44 @@ For more information, see {ref}/notification-settings.html#ssl-notification-sett
Once you've enabled SSL for {kib}, all requests to the reporting endpoints must include valid credentials.

For more information on sharing reports, direct links, and more, refer to <<reporting-getting-started, Reporting and sharing>>.

[float]
[[install-reporting-packages]]
=== Install the dependencies for the headless browser

If using PNG/PDF {report-features}, make sure the {kib} server operating system has the appropriate packages installed for the distribution.

If you are using RHEL operating systems, install the following packages:

* `ipa-gothic-fonts`
* `xorg-x11-fonts-100dpi`
* `xorg-x11-fonts-75dpi`
* `xorg-x11-utils`
* `xorg-x11-fonts-cyrillic`
* `xorg-x11-fonts-Type1`
* `xorg-x11-fonts-misc`
* `fontconfig`
* `freetype`

If you are using Ubuntu/Debian systems, install the following packages:

* `fonts-liberation`
* `libfontconfig1`
* `libnss3`

The screenshotting plugin used for {reporting-features} has a built-in utility to check for common issues, such as missing dependencies. See
<<reporting-diagnostics>> for more information.

[float]
[[set-reporting-server-host]]
=== Set the `server.host` for the headless browser

If using PNG/PDF {report-features} in a production environment, it is preferred to use the setting of
`server.host: 0.0.0.0` in the `kibana.yml` configuration file. This allows the headless browser used for
PDF/PNG reporting to reach {kib} over a local interface, while also allowing the {kib} server to listen on
outward-facing network interfaces, as it makes the {kib} server accessible from any network interface on the
machine. Make sure that no firewall rules or other routing rules prevent local services from accessing this
address.

For the most reliable configuration of PDF/PNG {report-features}, consider installing {kib} using <<docker, Docker>>, or
using <<set-up-on-cloud, Elastic Cloud>>.
6 changes: 1 addition & 5 deletions x-pack/plugins/reporting/server/config/create_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ export function createConfig(
ipaddr.isValid(kibanaServerHostname) &&
!sum(ipaddr.parse(kibanaServerHostname).toByteArray())
) {
logger.warn(
`Found 'server.host: "0.0.0.0"' in Kibana configuration. Reporting is not able to use this as the Kibana server hostname.` +
` To enable PNG/PDF Reporting to work, 'xpack.reporting.kibanaServer.hostname: localhost' is automatically set in the configuration.` +
` You can prevent this message by adding 'xpack.reporting.kibanaServer.hostname: localhost' in kibana.yml.`
);
// A silent override to use "localhost" instead of "0.0.0.0" for connection of the headless browser
kibanaServerHostname = 'localhost';
}
// kibanaServer.port, default to server.port
Expand Down

0 comments on commit 627d7e6

Please sign in to comment.