diff --git a/explore-analyze/report-and-share.md b/explore-analyze/report-and-share.md index c2001de024..b534c8c18c 100644 --- a/explore-analyze/report-and-share.md +++ b/explore-analyze/report-and-share.md @@ -82,33 +82,33 @@ In the following dashboard, the shareable container is highlighted: :screenshot: ::: -1. Open the saved Discover session, dashboard, visualization, or workpad you want to share. -2. From the toolbar, click **Share**, then select the report option. +1. Open the saved Discover session, dashboard, visualization, or **Canvas** workpad you want to share. +2. Choose a file type for the report. - * If you are creating dashboard PDFs, select **For printing** to create printer-friendly PDFs with multiple A4 portrait pages and two visualizations per page. + * {applies_to}`stack: ga 9.0` From the toolbar, click **Share** > **Export** tab, then choose a file type. Note that when you create a dashboard report that includes a data table or Discover session, the PDF includes only the visible data. + * {applies_to}`stack: ga 9.1` From the toolbar, click the **Export** icon, then choose a file type. - ::::{note} - When you create a dashboard report that includes a data table or Discover session, the PDF includes only the visible data. - :::: + ::::{tip} - * If you are creating workpad PDFs, select **Full page layout** to create PDFs without margins that surround the workpad. + Tips for generating PDF reports: -3. Generate the report by clicking **Export file**, **Generate CSV**, or **Generate PDF**, depending on the object you want to export. + * If you are creating dashboard PDFs, select **For printing** to create printer-friendly PDFs with multiple A4 portrait pages and two visualizations per page. + * {applies_to}`stack: ga 9.0` If you are creating workpad PDFs, select **Full page layout** to create PDFs without margins that surround the workpad. + + :::: - ::::{note} - You can use the **Copy POST URL** option instead to generate the report from outside Kibana or from Watcher. - :::: +3. Click the button that generates or exports the report. A message appears, indicating that the report is in the export queue. -4. A message appears, indicating that the report is in the export queue. + ::::{note} + To generate the report from outside of {{kib}} or from {{watcher}}, use the POST URL, then submit an HTTP `POST` request using a script or {{watcher}}. In {{stack}} 9.1, you can schedule a recurring task in {{kib}} that generates reports on a repeating basis. Refer to [Automatically generate reports](report-and-share/automating-report-generation.md) to learn more. + :::: -You can then download it from that message, or go to the **Stack Management > Reporting** page to view and access all of your reports. +Go to the **Reporting** page to access all of your reports. To find the page, navigate to **Stack Management > Alerts and Insights > Reporting** in the main menu, or use the [global search field](find-and-organize/find-apps-and-objects.md). ::::{note} In self-managed and Cloud hosted deployments, reports are stored in {{es}} and managed by the `kibana-reporting` {{ilm}} ({{ilm-init}}) policy. By default, the policy stores reports forever. To learn more about {{ilm-init}} policies, refer to the {{es}} [{{ilm-init}} documentation](/manage-data/lifecycle/index-lifecycle-management.md). :::: - - ### CSV report limitations [csv-limitations] We recommend using CSV reports to export moderate amounts of data only. The feature enables analysis of data in external tools, but it is not intended for bulk export or to backup Elasticsearch data. Report timeout and incomplete data issues are likely if you are exporting data where: diff --git a/explore-analyze/report-and-share/automating-report-generation.md b/explore-analyze/report-and-share/automating-report-generation.md index a156cb35c5..8bf0fa06cc 100644 --- a/explore-analyze/report-and-share/automating-report-generation.md +++ b/explore-analyze/report-and-share/automating-report-generation.md @@ -10,27 +10,33 @@ products: # Automatically generate reports [automating-report-generation] -To automatically generate PDF and CSV reports, generate a POST URL, then submit the HTTP `POST` request using {{watcher}} or a script. - +To automatically generate PDF and CSV reports, generate a POST URL, then submit an HTTP `POST` request using {{watcher}} or a script. In 9.1.0 and Serverless, you can use {{kib}} to generate reports on a recurring schedule and share them with a list of emails that you specify. ## Create a POST URL [create-a-post-url] Create the POST URL that triggers a report to generate PDF and CSV reports. +### PDF reports + To create the POST URL for PDF reports: 1. Go to **Dashboards**, **Visualize Library**, or **Canvas**. -2. Open the dashboard, visualization, or **Canvas** workpad you want to view as a report. +2. Open the dashboard, visualization, or **Canvas** workpad you want to view as a report. From the toolbar, do one of the following: - * If you are using **Dashboard** or **Visualize Library**, from the toolbar, click **Share > Export**, select the PDF option then click **Copy POST URL**. - * If you are using **Canvas**, from the toolbar, click **Share > PDF Reports**, then click **Advanced options > Copy POST URL**. + * {applies_to}`stack: ga 9.0` If you are using **Dashboard** or **Visualize Library**, click **Share > Export**, select the PDF option then click **Copy POST URL**. + * {applies_to}`stack: ga 9.0` If you are using **Canvas**, click **Share > PDF Reports**, then click **Advanced options > Copy POST URL**. + * {applies_to}`stack: ga 9.0` Click the **Export** icon, then **PDF**. In the export flyout, copy the POST URL. +### CSV reports To create the POST URL for CSV reports: 1. Go to **Discover**. 2. Open the saved Discover session you want to share. -3. In the toolbar, click **Share > Export > Copy POST URL**. +3. In the toolbar, do one of the following: + + * {applies_to}`stack: ga 9.0` Click **Share > Export > Copy POST URL**. + * {applies_to}`stack: ga 9.1` Click the **Export** icon, then **CSV**. In the export flyout, copy the POST URL. ## Use Watcher [use-watcher] @@ -159,3 +165,87 @@ If you experience issues with the deprecated report URLs after you upgrade {{kib :::{important} In earlier {{kib}} versions, you could use the `&sync` parameter to append to report URLs that held the request open until the document was fully generated. The `&sync` parameter is now unsupported. If you use the `&sync` parameter in Watcher, you must update the parameter. ::: + +## Schedule and share reports [schedule-report-generation] + +```{applies_to} +stack: preview 9.1 +serverless: preview +``` + +Save time by setting up a recurring task that automatically generates reports and shares them on a schedule that you choose. + +### Requirements [scheduled-reports-reqs] + +* To use reporting, your {{kib}} instance must have a minimum of 2GB of RAM. +* To use the scheduled reports feature, your role needs [access to reporting](../../deploy-manage/kibana-reporting-configuration.md#grant-user-access). +* (Optional) To view and manage other users’ reports and schedules, your role needs `All` privileges for the **Manage Scheduled Reports** feature. You can set this by configuring your role's {{kib}} privileges. If your role doesn't have the **Manage Scheduled Reporting** feature privilege, you can only share reports with yourself. +* Sharing reports outside of {{kib}} requires a default preconfigured email connector. + + * **{{ech}} or {{serverless-short}} users**: You do not need to set up a default preconfigured email connector. Kibana provides you with a built-in preconfigured email connector that uses the SMTP protocol to send emails. To view it, go to the **Connectors** page and find the Elastic-Cloud-SMTP connector. + * **Self-managed users**: You must set up a default preconfigured email connector to send notifications outside of {{kib}}. To do this: + + 1. Open your `kibana.yml` file. + 2. Add the `xpack.actions.preconfigured` {{kib}} setting. This setting specifies configuration details for the preconfigured connector that you're defining. + 2. Under the `xpack.actions.preconfigured` setting, define the email connector. Refer to [Email connectors](kibana://reference/connectors-kibana/pre-configured-connectors.md#preconfigured-email-configuration) to learn about requirements for different email services and providers. + + :::{note} + You must define preconfigured email connector details in the `kibana.yml` file. You cannot create a preconfigured email connector from the {{kib}} UI. + ::: + + 3. Add the `notifications.connectors.default.email` {{kib}} setting, and provide the name of your email connector. The `notifications.connectors.default.email` setting specifies the default email connector to use when sending notifications. This is especially useful if you have multiple email connectors and want to set a default one. + + The following example shows a modified `kibana.yml` file with a preconfigured email connector that's set as the default connector for email notifications: + + ``` + xpack.actions.preconfigured: + my-email: + name: preconfigured-email-connector-type + actionTypeId: .email + config: + service: other + from: testsender@test.com + host: validhostname + port: 8080 + secure: false + hasAuth: true + secrets: + user: testuser + password: passwordkeystorevalue + + notifications.connectors.default.email: my-email + ``` + +### Create a schedule [create-scheduled-report] + +1. Open the saved Discover session, dashboard, or visualization you want to share. +2. Click the **Export** icon, then **Schedule export**. +3. Enter the requested details, and (optional) enable **Print format** to generate the report in a printer-friendly format. +4. Set up a schedule for generating the report. + + * **Date**: Choose when to start generating reports. + * **Timezone**: Specify a timezone for the schedule. + * **Repeat**: Choose how often you want to generate reports. + +5. (Optional) To share generated reports outside of Kibana, enable **Send by email** and enter a list of email addresses. Recipients will receive emails with the generated reports attached and on the schedule that you specified. + + ::::{note} + If your role doesn't have the **Manage Scheduled Reporting** feature privilege, you can only send reports to yourself. + :::: + +6. Click **Schedule exports** to save the schedule. + +A message appears, indicating that the schedule is available on the **Reporting** page. From the **Reporting** page, click on the **Schedules** tab to view details for the newly-created schedule. + +::::{important} +Note that you cannot edit or delete a schedule after you create it. To stop the schedule from running, you must disable it. Disabling a schedule permanently stops it from running. To restart it, you must create a new schedule. +:::: + +### Scheduled reports limitations [scheduled-reports-limitations] + +The feature enables analysis of data in external tools, but it is not intended for bulk export or to backup Elasticsearch data. Issues with report generation and sharing are likely to happen in the following scenarios: + +* {{kib}} might fail to attach reports that exceed the size limit for email attachments, which is... +* Scheduling too many reports at the same time might cause reports to be shared late or at an inconsistent schedule. {{kib}} Task Manager runs reporting tasks one at a time. +* If your cluster is running many tasks in general, reports may be delayed. +* Scheduling reports of Canvas workpads is not supported since Canvas workpads are in maintenance mode. \ No newline at end of file