1+++
2title = "Reporting"
3description = ""
4keywords = ["grafana", "reporting"]
5aliases = ["/docs/grafana/latest/administration/reports"]
6weight = 800
7+++
8
9# Reporting
10
11Reporting allows you to automatically generate PDFs from any of your dashboards and have Grafana email them to interested parties on a schedule. This is available in Grafana Cloud Pro and Advanced and in Grafana Enterprise.
12
13> If you have [Fine-grained access Control]({{< relref "../enterprise/access-control/_index.md" >}}) enabled, for some actions you would need to have relevant permissions.
14> Refer to specific guides to understand what permissions are required.
15
16{{< figure src="/static/img/docs/enterprise/reports_list_8.1.png" max-width="500px" class="docs-image--no-shadow" >}}
17
18Any changes you make to a dashboard used in a report are reflected the next time the report is sent. For example, if you change the time range in the dashboard, then the time range in the report changes as well.
19
20## Requirements
21
22- SMTP must be configured for reports to be sent. Refer to [SMTP]({{< relref "../administration/configuration.md#smtp" >}}) in [Configuration]({{< relref "../administration/configuration.md" >}}) for more information.
23- The Image Renderer plugin must be installed or the remote rendering service must be set up. Refer to [Image rendering]({{< relref "../image-rendering/" >}}) for more information.
24
25## Access control
26
27When [Fine-grained access control]({{< relref "../enterprise/access-control/_index.md" >}}) is enabled, you need to have the relevant [Permissions]({{< relref "../enterprise/access-control/permissions.md" >}}) to create and manage reports.
28
29## Create or update a report
30
31Only organization admins can create reports by default. You can customize who can create reports with [fine-grained access control]({{< relref "../enterprise/access-control/_index.md" >}}).
32
331. Click on the reports icon in the side menu. The Reports tab allows you to view, create, and update your reports.
341. Enter report information. All fields are required unless otherwise indicated.
35   - **Report name -** Name of the report as you want it to appear in the Reports list. It's also used as the email subject.
36   - **Recipients -** Enter the emails of the people or teams that you want to receive the report, separated by commas or semicolons.
37   - **Reply to -** (optional) The address that will appear in the **Reply to** field of the email.
38   - **Message -** (optional) Message body in the email with the report.
39   - **Include a dashboard link -** Include a link to the dashboard from within the report email.
40   - **Source dashboard -** Select the dashboard to generate the report from.
41   - **Time range -** (optional) Use custom time range for the report. For more information check [Report time range]({{< relref "#report-time-range" >}}).
421. Select an orientation for the report: **Portrait** or **Landscape**.
431. Select a layout for the generated report: **Simple** or **Grid**. The simple layout renders each panel as full-width across the PDF. The grid layout renders the PDF with the same panel arrangement and width as the source dashboard.
441. **Add a CSV file of table panel data**: check this box to attach a CSV file to the report email for each table panel on the dashboard.
451. **Preview PDF** View a rendered PDF with the options you have selected.
461. Enter scheduling information. Options vary depending on the frequency you select.
471. **Save** the report.
481. **Send test email** to verify that the whole configuration is working as expected. You can choose to send this email to the recipients configured for the report, or to a different set of email addresses only used for testing.
49
50{{< figure src="/static/img/docs/enterprise/reports_create_new_8.1.png" max-width="500px" class="docs-image--no-shadow" >}}
51
52### Choose template variables
53
54> **Note:** Available in Grafana Enterprise version 7.5+ (behind `reportVariables` feature flag) and Grafana Enterprise version 8+ without a feature flag.
55
56You can configure report-specific template variables for the dashboard on the report page. The variables that you select will override the variables from the dashboard, and they are used when rendering a PDF file of the report. For detailed information about using template variables, refer to the [Templates and variables]({{< relref "../variables/_index.md" >}}) section.
57
58> **Note:** The query variables saved with a report might go out of date if the results of that query change. For example, if your template variable queries for a list of hostnames and a new hostname is added, then it will not be included in the report. If that happens, the selected variables will need to be manually updated in the report. If you select the `All` value for the template variable or if you keep the dashboard's original variable selection, then the report will stay up-to-date as new values are added.
59
60### Render a report with panels or rows set to repeat by a variable
61
62> **Note:** Available in Grafana Enterprise v8+.
63
64You can include dynamic dashboards with panels or rows, set to repeat by a variable, into reports. For detailed information about setting up repeating panels or rows in dashboards, refer to the [Repeat panels or rows]({{< relref "../panels/repeat-panels-or-rows.md" >}}) section.
65
66#### Caveats:
67
68- Rendering repeating panels for dynamic variable types (e.g. `query` variables) with selected `All` value is currently not supported. As a workaround, it is possible to individually select all the values instead.
69- If you select different template variables in a report for a dashboard with repeating rows, you might see empty space or missing values at the bottom of the report. This is because the dimensions of the panels from the dashboard are used to generate the report. To avoid this issue, use the dashboard's original template variables for the report, or make a copy of the dashboard, select the new set of template variables, and generate a report based on the copied dashboard.
70- Rendering of the repeating panels inside collapsed rows in reports is not supported.
71
72### Report time range
73
74> Setting custom report time range is available in Grafana Enterprise v7.2+.
75
76By default, reports use the saved time range of the dashboard. Changing the time range of the report can be done by:
77
78- Saving a modified time range to the dashboard.
79- Setting a time range via **Time range** field in the report form. If specified, then this custom time range overrides the one from the report's dashboard.
80
81The 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.
82
83If 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. To avoid this, set the time zone to UTC for dashboards when using a remote renderer. Each dashboard's time zone setting is visible in the [time range controls]({{< relref "../dashboards/time-range-controls.md/#dashboard-time-settings" >}}).
84
85### Layout and orientation
86
87> We're actively working on developing new report layout options. [Contact us](https://grafana.com/contact?about=grafana-enterprise&topic=design-process&value=reporting) if you would like to get involved in the design process.
88
89| Layout | Orientation | Support | Description                                                                                               | Preview                                                                                                                                               |
90| ------ | ----------- | ------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
91| Simple | Portrait    | v6.4+   | Generates an A4 page in portrait mode with three panels per page.                                         | {{< figure src="/static/img/docs/enterprise/reports_portrait_preview.png" max-width="500px" max-height="500px" class="docs-image--no-shadow" >}}      |
92| Simple | Landscape   | v6.7+   | Generates an A4 page in landscape mode with a single panel per page.                                      | {{< figure src="/static/img/docs/enterprise/reports_landscape_preview.png" max-width="500px" class="docs-image--no-shadow" >}}                        |
93| Grid   | Portrait    | v7.2+   | Generates an A4 page in portrait mode with panels arranged in the same way as at the original dashboard.  | {{< figure src="/static/img/docs/enterprise/reports_grid_portrait_preview.png" max-width="500px" max-height="500px" class="docs-image--no-shadow" >}} |
94| Grid   | Landscape   | v7.2+   | Generates an A4 page in landscape mode with panels arranged in the same way as at the original dashboard. | {{< figure src="/static/img/docs/enterprise/reports_grid_landscape_preview.png" max-width="500px" class="docs-image--no-shadow" >}}                   |
95
96### CSV export
97
98> **Note:** Only available in Grafana Enterprise v8.0+, with the [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) v3.0+.
99
100You can attach a CSV file to the report email for each table panel on the selected dashboard, along with the PDF report. By default, CSVs larger than 10Mb won't be sent to avoid email servers to reject the email. You can increase or decrease this limit in the [reporting configuration]({{< relref "#rendering-configuration" >}}).
101
102This feature relies on the same plugin that supports the [image rendering]({{< relref "../image-rendering/" >}}) features.
103
104When the CSV file is generated, it is temporarily written to the `csv` folder in the Grafana `data` folder.
105
106A background job runs every 10 minutes and removes temporary CSV files. You can configure how long a CSV file should be stored before being removed by configuring the [temp-data-lifetime]({{< relref "../administration/configuration/#temp-data-lifetime" >}}) setting. This setting also affects how long a renderer PNG file should be stored.
107
108### Scheduling
109
110> Note: Scheduler has been significantly changed in Grafana Enterprise v8.1.
111
112Scheduled reports can be sent once or repeatedly on an hourly, daily, weekly, or monthly basis, or at custom intervals. You can also disable scheduling by selecting **Never**: for example, if you want to send the report via the API.
113
114{{< figure src="/static/img/docs/enterprise/reports_scheduler_8.1.png" max-width="500px" class="docs-image--no-shadow" >}}
115
116**Send now or schedule for later**
117
118- **Send now** sends the report immediately after you save it. To stop sending the report at some point in the future, add an end date. If you leave the end date empty, the report is sent out indefinitely.
119
120- **Send later** schedules a report for a later date. Thus, the start date and time are required fields. If you leave the end date empty, the report is sent out indefinitely.
121
122**Send only from Monday to Friday**
123
124For reports that have an hourly or daily frequency, you can choose to send them only from Monday to Friday.
125
126**Send on the last day of the month**
127
128When you schedule a report with a monthly frequency, and set the start date between the 29th and the 31st of the month, the report is only sent during the months that have those dates. If you want the report to be sent every month, select the **Send on the last day of the month** option instead. This way, the report is sent on the last day of every month regardless of how many days there are in any given month.
129
130### Send test email
131
132> Only available in Grafana Enterprise v7.0+.
133
1341. In the report, click **Send test email**.
1351. In the Email field, enter the email address or addresses that you want to test, separated by semicolon.
136   If you want to use email addresses from the report, then select the **Use emails from report** check box.
1371. Click **Send**.
138
139The last saved version of the report will be sent to selected emails. You can use this to verify emails are working and to make sure the report is generated and displayed as you expect.
140
141{{< figure src="/static/img/docs/enterprise/reports_send_test_mail.png" max-width="500px" class="docs-image--no-shadow" >}}
142
143## Pause report
144
145> **Note:** Available in Grafana Enterprise v8+.
146
147You can pause sending of reports from the report list view by clicking the pause icon. The report will not be sent according to its schedule until it is resumed by clicking the resume button on the report row.
148
149## Send report via the API
150
151You can send reports programmatically with the [send report]({{< relref "../http_api/reporting.md#send-report" >}}) endpoint in the [HTTP APIs]({{< relref "../http_api" >}}).
152
153## Rendering configuration
154
155When 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.
156
157To make a panel more legible, you can set a scale factor for the rendered images. However, a higher scale factor increases the file size of the generated PDF.
158
159You can also specify custom fonts that support different Unicode scripts. The DejaVu font is the default used for PDF rendering.
160
161These options are available in the [configuration]({{< relref "../administration/configuration.md">}}) file.
162
163```ini
164[reporting]
165# Set timeout for each panel rendering request
166rendering_timeout = 10s
167# Set maximum number of concurrent calls to the rendering service
168concurrent_render_limit = 4
169# Set the scale factor for rendering images. 2 is enough for monitor resolutions
170# 4 would be better for printed material. Setting a higher value affects performance and memory
171image_scale_factor = 2
172# Set the maximum file size in megabytes for the CSV attachments
173max_attachment_size_mb = 10
174# Path to the directory containing font files
175fonts_path =
176# Name of the TrueType font file with regular style
177font_regular = DejaVuSansCondensed.ttf
178# Name of the TrueType font file with bold style
179font_bold = DejaVuSansCondensed-Bold.ttf
180# Name of the TrueType font file with italic style
181font_italic = DejaVuSansCondensed-Oblique.ttf
182```
183
184## Reports settings
185
186> **Note:** Available in Grafana Enterprise v7.2+.
187
188You can configure organization-wide report settings in the **Settings** tab on the **Reporting** page. Settings are applied to all the reports for current organization.
189
190You can customize the branding options.
191
192Report branding:
193**Company logo URL** - Company logo displayed in the report PDF. Defaults to the Grafana logo.
194
195Email branding:
196
197- **Company logo URL** - Company logo displayed in the report PDF. Defaults to the Grafana logo.
198- **Email footer** - Toggle to enable report email footer. Select **Sent by** or **None**.
199- **Footer link text** - Text for the link in the report email footer. Defaults to "Grafana".
200- **Footer link URL** - Link for the report email footer.
201
202{{< figure src="/static/img/docs/enterprise/reports_settings.png" max-width="500px" class="docs-image--no-shadow" >}}
203
204## Troubleshoot reporting
205
206To troubleshoot and get more log information, enable debug logging in the configuration file. Refer to [Configuration]({{< relref "../administration/configuration.md#filters" >}}) for more information.
207
208```bash
209[log]
210filters = report:debug
211```
212