Reports
The reporting system creates professional reports based on HTML templates. Reports can be generated manually or on a schedule and sent via email.
Concept
The reporting system consists of three layers:
- Base Templates - Reusable HTML/CSS base layouts
- Report Templates - Specific reports with SQL queries and variables
- Generated Reports - Final PDF/HTML documents
Managing Templates
Access template management via the Reports navigation item.
Base Templates
Base templates define the fundamental layout of a report:
- HTML structure (header, footer, page layout)
- CSS styling (colors, fonts, spacing)
- Placeholders for dynamic content
DATAZONE Control ships with default base templates that you can customize or use as a starting point.
Creating Report Templates
- Click Create Template
- Configure the template:
| Field | Description |
|---|---|
| Name | Name of the template |
| Description | Purpose of the report |
| Base Template | Underlying layout |
| HTML Template | Report-specific HTML |
| CSS | Additional styles |
| SQL Queries | Data queries for the report |
Template Editor
The integrated editor provides:
- Syntax highlighting for HTML, CSS, and SQL
- Line numbers
- Live preview
Variables
The following variables are available in templates:
Host Lists
| Variable | Description |
|---|---|
| List of all OPNsense firewalls with all fields |
| List of all PVE hosts with VM/container counts |
| List of all PBS hosts with datastore info |
| List of all Linux servers |
| List of all Windows servers |
Context Variables
| Variable | Description |
|---|---|
| Selected customer (for customer-specific reports) |
| Generation date (ISO format) |
| Company name (from branding settings) |
| Company logo as Base64 image (from branding) |
| Report period (if configured) |
Custom Variables
Report templates can define their own default variables that can be overridden during generation or in the schedule:
| Variable | Example | Description |
|---|---|---|
| "Firma GmbH" | Filter for a specific customer |
| "web*" | Filter for specific hostnames |
| "warning" | Only hosts with this severity or higher |
Generating Reports
Manual
- Select a template
- Click Generate Report
- Optionally select a customer for filtering
- The report is generated and can be downloaded
Batch Generation
To create reports for all customers at once:
- Select a template
- Click Batch Generate
- A separate report is created for each customer
Scheduled
Report schedules automate regular report creation:
- Select a template
- Click Create Schedule
- Configure:
| Field | Description |
|---|---|
| Name | Name of the schedule |
| Schedule Type | Daily, weekly, monthly, or Cron |
| Time | Execution time (HH:MM) |
| Day | Day of the week or day of the month (depending on type) |
| Cron Expression | Free cron expression (for type "Cron") |
| Variables | Overridable template variables |
Schedule Types
| Type | Description |
|---|---|
| Daily | Every day at the specified time |
| Weekly | On the selected day of the week |
| Monthly | On the selected day of the month |
| Cron | Free cron expression for complex schedules |
Email Delivery
Generated reports can be sent via email:
- Open a generated report
- Click Send via Email
- Enter the recipient
- Optional: Customize the subject and message
Prerequisite
SMTP settings must be configured under Settings for email delivery to work.
Export Formats
Generated reports can be exported in the following formats:
| Format | Description |
|---|---|
| HTML | Web view directly in the browser |
| Via the browser print function (Ctrl+P → Save as PDF) |
PDF Creation
Since reports are rendered as HTML, use the browser print function for professional PDF exports. The CSS styles of the base template include @media print rules for optimal print layout.
Preview
Before generating, you can preview the report:
- Select a template
- Click the eye icon (Preview)
- The report is rendered with current data
Example Report
A typical infrastructure report might contain:
- Company header with logo and date
- Summary: Number of hosts per module, online/offline status
- Firewall overview: Versions, gateway status, last updates
- Server overview: CPU/RAM utilization, pending updates
- Backup status: Last backups, datastore usage
- Recommendations: Hosts with critical checks or outdated versions