Skip to content

Commit f897195

Browse files
[ResponseOps][Reporting][9.1 & Serverless] Scheduled Exports External Docs (#2118)
Contributes to #1541 by documenting the new scheduled reports feature and updating other parts of the docs that are affected by UI changes. Previews: - [Reporting and sharing | Export as a file](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/2118/explore-analyze/report-and-share#manually-generate-reports): Added instructions for exporting reports as a file in 9.1. - [Automatically generate reports](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/2118/explore-analyze/report-and-share/automating-report-generation): Updated the intro para for the page and made a few additional changes: - [Create a POST URL](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/2118/explore-analyze/report-and-share/automating-report-generation#create-a-post-url): Added steps for creating a POST URL in 9.1. Also added sub-headings to visually separate instructions and fixed outdated info. - [Schedule reports in Kibana](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/2118/explore-analyze/report-and-share/automating-report-generation#schedule-report-generation): New section for scheduling reports **Corresponding 8.19 docs:** TBD --------- Co-authored-by: Mike Birnstiehl <114418652+mdbirnstiehl@users.noreply.github.com>
1 parent 114c1ee commit f897195

File tree

2 files changed

+114
-21
lines changed

2 files changed

+114
-21
lines changed

explore-analyze/report-and-share.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,33 +82,33 @@ In the following dashboard, the shareable container is highlighted:
8282
:screenshot:
8383
:::
8484

85-
1. Open the saved Discover session, dashboard, visualization, or workpad you want to share.
86-
2. From the toolbar, click **Share**, then select the report option.
85+
1. Open the saved Discover session, dashboard, visualization, or **Canvas** workpad you want to share.
86+
2. Choose a file type for the report.
8787

88-
* If you are creating dashboard PDFs, select **For printing** to create printer-friendly PDFs with multiple A4 portrait pages and two visualizations per page.
88+
* {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.
89+
* {applies_to}`stack: ga 9.1` From the toolbar, click the **Export** icon, then choose a file type.
8990

90-
::::{note}
91-
When you create a dashboard report that includes a data table or Discover session, the PDF includes only the visible data.
92-
::::
91+
::::{tip}
9392

94-
* If you are creating workpad PDFs, select **Full page layout** to create PDFs without margins that surround the workpad.
93+
Tips for generating PDF reports:
9594

96-
3. Generate the report by clicking **Export file**, **Generate CSV**, or **Generate PDF**, depending on the object you want to export.
95+
* If you are creating dashboard PDFs, select **For printing** to create printer-friendly PDFs with multiple A4 portrait pages and two visualizations per page.
96+
* {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.
97+
98+
::::
9799

98-
::::{note}
99-
You can use the **Copy POST URL** option instead to generate the report from outside Kibana or from Watcher.
100-
::::
100+
3. Click the button that generates or exports the report. A message appears, indicating that the report is in the export queue.
101101

102-
4. A message appears, indicating that the report is in the export queue.
102+
::::{note}
103+
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.
104+
::::
103105

104-
You can then download it from that message, or go to the **Stack Management > Reporting** page to view and access all of your reports.
106+
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).
105107

106108
::::{note}
107109
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).
108110
::::
109111

110-
111-
112112
### CSV report limitations [csv-limitations]
113113

114114
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:

explore-analyze/report-and-share/automating-report-generation.md

Lines changed: 99 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,33 @@ products:
1010

1111
# Automatically generate reports [automating-report-generation]
1212

13-
To automatically generate PDF and CSV reports, generate a POST URL, then submit the HTTP `POST` request using {{watcher}} or a script.
14-
13+
To automatically generate PDF and CSV reports, generate a POST URL, then submit an HTTP `POST` request using {{watcher}} or a script. In {{stack}} 9.1 and Serverless, you can use {{kib}} to generate reports on a recurring schedule and share them with a list of emails that you specify.
1514

1615
## Create a POST URL [create-a-post-url]
1716

1817
Create the POST URL that triggers a report to generate PDF and CSV reports.
1918

19+
### PDF reports
20+
2021
To create the POST URL for PDF reports:
2122

2223
1. Go to **Dashboards**, **Visualize Library**, or **Canvas**.
23-
2. Open the dashboard, visualization, or **Canvas** workpad you want to view as a report.
24+
2. Open the dashboard, visualization, or **Canvas** workpad you want to view as a report. From the toolbar, do one of the following:
2425

25-
* If you are using **Dashboard** or **Visualize Library**, from the toolbar, click **Share > Export**, select the PDF option then click **Copy POST URL**.
26-
* If you are using **Canvas**, from the toolbar, click **Share > PDF Reports**, then click **Advanced options > Copy POST URL**.
26+
* {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**.
27+
* {applies_to}`stack: ga 9.0` If you are using **Canvas**, click **Share > PDF Reports**, then click **Advanced options > Copy POST URL**.
28+
* {applies_to}`stack: ga 9.1` Click the **Export** icon, then **PDF**. In the export flyout, copy the POST URL.
2729

30+
### CSV reports
2831

2932
To create the POST URL for CSV reports:
3033

3134
1. Go to **Discover**.
3235
2. Open the saved Discover session you want to share.
33-
3. In the toolbar, click **Share > Export > Copy POST URL**.
36+
3. In the toolbar, do one of the following:
37+
38+
* {applies_to}`stack: ga 9.0` Click **Share > Export > Copy POST URL**.
39+
* {applies_to}`stack: ga 9.1` Click the **Export** icon, then **CSV**. In the export flyout, copy the POST URL.
3440

3541

3642
## Use Watcher [use-watcher]
@@ -159,3 +165,90 @@ If you experience issues with the deprecated report URLs after you upgrade {{kib
159165
:::{important}
160166
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.
161167
:::
168+
169+
## Schedule and share reports [schedule-report-generation]
170+
171+
```{applies_to}
172+
stack: preview 9.1
173+
serverless: preview
174+
```
175+
176+
Save time by setting up a recurring task that automatically generates reports and shares them on a schedule that you choose.
177+
178+
### Prerequisites [scheduled-reports-reqs]
179+
180+
* To generate PDF and PNG reports, your {{kib}} instance needs a minimum of 2GB of RAM. There is no minimum requirement for CSV reports.
181+
* To use the scheduled reports feature, your role needs [access to reporting](../../deploy-manage/kibana-reporting-configuration.md#grant-user-access).
182+
* (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.
183+
* Sharing reports outside of {{kib}} requires a default preconfigured email connector.
184+
185+
* **{{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.
186+
* **Self-managed users**: You must set up a default preconfigured email connector to send notifications outside of {{kib}}. To do this:
187+
188+
1. Open your `kibana.yml` file.
189+
2. Add the `xpack.actions.preconfigured` {{kib}} setting. This setting specifies configuration details for the preconfigured connector that you're defining.
190+
3. 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.
191+
192+
:::{note}
193+
You must define preconfigured email connector details in the `kibana.yml` file. You cannot create a preconfigured email connector from the {{kib}} UI.
194+
:::
195+
196+
4. 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.
197+
198+
The following example shows a modified `kibana.yml` file with a preconfigured email connector that's set as the default connector for email notifications:
199+
200+
```
201+
xpack.actions.preconfigured:
202+
my-email:
203+
name: preconfigured-email-connector-type
204+
actionTypeId: .email
205+
config:
206+
service: other
207+
from: testsender@test.com
208+
host: validhostname
209+
port: 8080
210+
secure: false
211+
hasAuth: true
212+
secrets:
213+
user: testuser
214+
password: passwordkeystorevalue
215+
216+
notifications.connectors.default.email: my-email
217+
```
218+
219+
* (Optional) To control who can receive email notifications from {{kib}}, add the [`xpack.actions.email.domain_allowlist` setting](kibana://reference/configuration-reference/alerting-settings.md) to your `kibana.yml` file. To learn more about configuring this setting, refer to [Notifications domain allowlist](../alerts-cases/alerts/notifications-domain-allowlist.md).
220+
221+
### Create a schedule [create-scheduled-report]
222+
223+
1. Open the saved Discover session, dashboard, or visualization you want to share.
224+
2. Click the **Export** icon, then **Schedule export**.
225+
3. Enter the requested details, and (optional) enable **Print format** to generate the report in a printer-friendly format.
226+
4. Set up a schedule for generating the report.
227+
228+
* **Date**: Choose when to start generating reports.
229+
* **Timezone**: Specify a timezone for the schedule.
230+
* **Repeat**: Choose how often you want to generate reports.
231+
232+
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.
233+
234+
::::{note}
235+
If your role doesn't have the **Manage Scheduled Reporting** feature privilege, you can only send reports to yourself.
236+
::::
237+
238+
6. Click **Schedule exports** to save the schedule.
239+
240+
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.
241+
242+
::::{important}
243+
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.
244+
::::
245+
246+
### Scheduled reports limitations [scheduled-reports-limitations]
247+
248+
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:
249+
250+
* The limit for email attachments is 10 MB. {{kib}} might fail to attach reports that are larger than this size.
251+
* 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.
252+
* If your cluster is running many tasks in general, reports may be delayed.
253+
* Scheduling reports of Canvas workpads is not supported since Canvas workpads are in maintenance mode.
254+
* Scheduling CSV reports of Lens visualizations is not supported.

0 commit comments

Comments
 (0)