Magistrala
User-guide

Reports

Generate and schedule IoT data reports

Overview

The Reports service enables users to generate, schedule, email and download data reports from connected devices and sensors.

Create a report

To create a report, click the Create Report button at the top right of the reports page.

Reports Table

This action redirects users to report creation page where required details can be provided. There are two main sections Configuration and Metrics.

In the Configuration section, the user is required to input general settings for the report such as:

PropertyDescriptionRequired
NameDescriptive name for the report
DescriptionAdditional context about the reportOptional
Report TitleThe title for the report
Report FormatThe file format for the report(pdf or csv)
Start TimeThe start time of the report
End TimeThe end time for the reportOptional
TimezoneThe timezone for displaying timestamps (e.g., "America/New_York", "Europe/London"). Defaults to UTC if not specifiedOptional
Aggregation MethodThe aggregation method e.g Maximum, Minimum e.t.cOptional
Aggregation IntervalThe interval used for aggregating messagesOptional

Config Section

In the Metrics section, users can define specific filters such as:

PropertyDescriptionRequired
NameThe value name of the message
ChannelThe channel that subscribed to the message
ClientsThe clients that sent the messagesOptional
SubtopicThe subtopic of the messageOptional
ProtocolThe protocol used to send the message (HTTP, MQTT, WebSocket,or COAP)Optional

Users can click the Add Metric button to add multiple metrics to a single report.

Metrics Section

Timezone Configuration

The Reports service supports timezone-aware timestamp display in generated reports. This allows users to view all timestamps in their preferred timezone rather than UTC.

How to Use Timezones

When creating or scheduling a report, you can specify a timezone in the Configuration section:

  1. Enter a valid IANA timezone name in the Timezone field (e.g., "America/New_York", "Europe/Paris", "Asia/Tokyo")
  2. If left empty, the report will default to UTC
  3. The timezone applies to:
    • Report generation timestamps (shown in headers and footers)
    • All message timestamps in both PDF and CSV formats

Supported Timezone Formats

The service accepts IANA timezone names, such as:

  • Americas: "America/New_York", "America/Los_Angeles", "America/Chicago"
  • Europe: "Europe/London", "Europe/Paris", "Europe/Berlin"
  • Asia: "Asia/Tokyo", "Asia/Shanghai", "Asia/Dubai"
  • Australia: "Australia/Sydney", "Australia/Melbourne"
  • Africa: "Africa/Cairo", "Africa/Johannesburg"

Note: Invalid timezone names will fall back to UTC automatically, and a warning will be logged.

Timezone Configuration

Generate an instant report

To generate an instant report, click the Generate Instant Report button. The report will be generated based on the provided configuration.

Download a report

To download a report, click the Download Report button. The report will be downloaded in the format specified in the report format field.

Email a report

To email a report, click the Email Report button, fill in the required fields, and the report will be sent to the specified recipients.

Email Report

Schedule a report

To schedule a report, click the Schedule Report button and two sections (Email Configuration and Schedule Configuration )appear.

In Email Configuration, users can configure how the report will be sent via email. The fields to be filled include:

PropertyDescriptionRequired
Recipient(s) EmailThe recipient's email address(es)
Email SubjectThe subject line of the email
Report FormatThe file format for the report (PDF or CSV).

In Schedule Configuration, users can configure when the report should be sent.
The fields to be filled include:

PropertyDescriptionRequired
Active FromThe start date for the report
Occurs atThe time of the report should be sent
Recurring IntervalHow often the report should repeat (e.g., daily, weekly).
Recurring PeriodHow many intervals to skip between executions (e.g., 1 = every interval, 2 = every second interval, etc.).Optional

Schedule Report

View a report

After a report is created, it will be added to the reports table. To view a report, click the row or click the View button in the row actions.

View Report

Update a report

While on the View Report Page, the user can update the details of the report, modify the schedule, add metrics or recipients, or download the report.

Update Report

Report Template

Each report has an associated HTML template that controls how the generated PDF report is rendered. To edit the template, navigate to the Template tab on the report topbar.

Report Template

Report Roles

Roles define a set of actions that can be allocated to users for a specific report.

To create a role, navigate to the Roles tab on the report topbar. Click on the + Create button and provide a role name. The actions and members are optional fields.

Report role page

Role Information

Report role create

The Role name is compulsory. You can optionally provide the role actions by selecting from the available actions. You can also optionally provide the members by selecting from the dropdown.

The following is the list of available actions for a report:

  • report_read
  • report_update
  • report_delete
  • report_manage_role
  • report_add_role_users
  • report_view_role_users
  • report_remove_role_users

Update Report Roles

Click a role in the Roles table to open its page. The page has two tables for the Role Actions and the assigned Role Members.

To update a role name, click on the pencil icon on the far right end of the field, update the value then click on the check icon to save or the cross icon to cancel.

Update role name

To update the Role Actions, click on the pencil icon. A dialog box will appear allowing you to select the actions you want to add.

Update role actions

To update the Role Members, click the Add Members button. A popup dialog will appear with the list of Domain Members from which a user can select.

Update role members

Delete Report Roles

You can delete actions by clicking on the trash icon. It opens a dialog that allows you to select which actions to remove. There is also an option to clear all the actions.

Delete role actions

For Role Members, you can clear the entire table with the Delete All Members button:

Delete all role members

To delete specific members from the Role Members table, click on the trash icon next to their entry.

Delete role members

Report Members

While members can be added through the Roles tab when creating a role, you can also assign members directly through the Members section.

Clicking the Assign Member button opens a dialog where you can select from the Domain Members and choose the role to assign them to.

Assign Members

Delete a report

To delete a report, click the Delete button in the row actions.

A confirmation dialog appears asking you to type the report's name before deletion is finalized. Use the copy button to copy the name, paste it into the input field, then click Delete to permanently remove the report.

Delete Report

On this page