Scheduled reports can be sent on a weekly, daily, or hourly basis. You may also disable scheduling for when you either want to pause a report or send it via the API.
All scheduling indicates when the reporting service will start rendering the dashboard. It can take a few minutes to render a dashboard with a lot of panels.
#### Hourly
Hourly reports are generated once per hour. All fields are required.
***At minute -** The number of minutes after full hour when the report should be generated.
***Time zone -** Time zone to determine the offset of the full hour. Does not currently change the time in the rendered report.
#### Daily
Daily reports are generated once per day. All fields are required.
***Time -** Time of day in 24 hours format when the report should be sent.
***Time zone -** Time zone for the **Time** field.
#### Weekly
Weekly reports are generated once per week. All fields are required.
***Day -** Weekday which the report should be sent on.
***Time -** Time of day in 24 hours format when the report should be sent.
***Time zone -** Time zone for the **Time** field.
#### Never
> Only available in Grafana Enterprise v7.0+.
Reports which are scheduled to never be sent have no parameter and will not be sent to the scheduler. They may be manually generated from the **Send test email** prompt or via the API.
### Send test mail
> Only available in Grafana Enterprise v7.0+.
> Only available in Grafana Enterprise v7.0+.
...
@@ -55,9 +90,17 @@ The last saved version of the report will be sent to selected emails. You can us
...
@@ -55,9 +90,17 @@ The last saved version of the report will be sent to selected emails. You can us
You can send reports programmatically with the [send report]({{<relref"../http_api/reporting.md#send-report">}}) endpoint in the [HTTP APIs]({{<relref"../http_api">}}).
## Rendering configuration
## Rendering configuration
When Grafana generates a report, it will render each panel separately and then put them together in a PDF file. You can configure the per-panel rendering request timeout and the maximum number of concurrent calls to the rendering service. These options are available in the [configuration]({{<relref"../installation/configuration.md">}}) file.
When generating reports, each panel renders separately before being collected in a PDF. The per panel rendering timeout and number of concurrently rendered panels can be configured.
To modify the panels' clarity you can set a scale factor for the rendered images. A higher scale factor is more legible but will increase the file size of the generated PDF.
These options are available in the [configuration]({{<relref"../installation/configuration.md">}}) file.
```ini
```ini
[reporting]
[reporting]
...
@@ -65,8 +108,19 @@ When Grafana generates a report, it will render each panel separately and then p
...
@@ -65,8 +108,19 @@ When Grafana generates a report, it will render each panel separately and then p
rendering_timeout=10s
rendering_timeout=10s
# Set maximum number of concurrent calls to the rendering service
# Set maximum number of concurrent calls to the rendering service
concurrent_render_limit=4
concurrent_render_limit=4
# Set the scale factor for rendering images. 2 is enough for monitor resolutions
# 4 would be better for printed material. Setting a higher value affects performance and memory
image_scale_factor=2
```
```
## Report time range
Reports use the saved time range of the dashboard. Changing the time range of the report is done by saving a modified time range to the dashboard.
The page header of the report displays the time range for the dashboard's data queries. Dashboards set to use the browser's time zone will use the time zone on the Grafana server.
If the time zone is set differently between your Grafana server and its remote image renderer, then the time ranges in the report might be different between the page header and the time axes in the panels. We advise always setting the time zone to UTC for dashboards when using a remote renderer to avoid this.
## Troubleshoot reporting
## Troubleshoot reporting
To troubleshoot and get more log information, enable debug logging in the configuration file. Refer to [Configuration]({{<relref"../installation/configuration.md#filters">}}) for more information.
To troubleshoot and get more log information, enable debug logging in the configuration file. Refer to [Configuration]({{<relref"../installation/configuration.md#filters">}}) for more information.
This API allows you to interact programmatically with the [Reporting]({{<relref"../enterprise/reporting.md">}}) feature.
> Reporting is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../enterprise" >}}).
## Send a report
> Only available in Grafana Enterprise v7.0+.
> This API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.
`POST /api/reports/email`
Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client's timeout to at least 60 seconds.
id | string | ID of the report to send. It is the same as in the URL when editing a report, not to be confused with the ID of the dashboard. Required.
emails | string | Comma-separated list of emails to which to send the report to. Overrides the emails from the report. Required if **useEmailsFromReport** is not present.
useEmailsFromReport | boolean | Send the report to the emails specified in the report. Required if **emails** is not present.
### Example response
```http
HTTP/1.1200OK
Content-Type:application/json
Content-Length:29
{"message":"Report was sent"}
```
### Status Codes
Code | Description
---- | -----------
200 | Report was sent.
400 | Bad request (invalid json, missing content-type, missing or invalid fields, etc.).
401 | Authentication failed, refer to [Authentication API]({{<relref"../http_api/auth.md">}}).
403 | User is authenticated but is not authorized to generate the report.
404 | Report not found.
500 | Unexpected error or server misconfiguration. Refer to body and/or server logs for more details.