Configuring Scheduled PDF Export
1. Prepare the Components
PDF export requires:
- all Smart Monitor Data Storage cluster nodes with the
sm-report,sm-job-scheduler, andopensearch-job-schedulerplugins - a Smart Monitor Web instance with the
smartMonitorPDFExportmodule and Chromium with the required system libraries - an SMTP server accessible from the Smart Monitor Data Storage nodes
For installation instructions, see Smart Monitor Data Storage and Smart Monitor Web. Prepare the Chromium libraries as described in Preparing to export to PDF.
The Smart Monitor Data Storage nodes must be able to access the PDF generation address and the SMTP server port. Smart Monitor Web must be able to access Smart Monitor Data Storage to run dashboard queries.
2. Configure PDF Generation
Cluster Settings
Apply these parameters through /_cluster/settings.
| Parameter | Default value | Purpose |
|---|---|---|
url_generation_pdf | https://localhost:5601/ | Base address of Smart Monitor Web |
report.user | Empty string | User for accessing the PDF generation service |
request_file_timeout | 120 | Maximum time to wait for the PDF to be ready, in seconds |
sme_request_timeout | 100 | Maximum time to wait for a dashboard search query response, in seconds |
Replace the address and username in this example with values for your installation:
PUT /_cluster/settings
{
"persistent": {
"url_generation_pdf": "https://sm-web.example.org:5601/",
"report.user": "pdf_service",
"request_file_timeout": 180,
"sme_request_timeout": 100
}
}
Password for the PDF Service
The password for the report.user account is stored in the keystore under the report.pass key.
Add the password on each Smart Monitor Data Storage node. The procedure for writing keys is described in Managing Keystore via API.
Node Parameters
When reading mail configurations, the user's permissions saved in the job are used. If they are absent or cannot be applied, the node parameters are used:
| Parameter | Default value | Purpose |
|---|---|---|
job_user | admin | Fallback user for reading SMTP configurations, groups, and recipients |
job_user_roles | ["all_access"] | Roles of the fallback user |
3. Configure SMTP
The user must have read access to the selected SMTP configuration, group, and its recipients.
Dedicated SMTP Configuration
Create a connection through the Job Scheduler API:
POST /_core/job_scheduler/smtp
{
"name": "Отчеты PDF",
"description": "Почтовый сервер для рассылки отчетов",
"host": "smtp.example.org",
"port": "465",
"user": "reports@example.org",
"user_email": "reports@example.org",
"password_id": "pdf_reports",
"timeout": 15000,
"proto": "ssl"
}
Alternatively, add an SMTP configuration in the interface: Main Menu - Settings - Module Settings - Job Scheduler - SMTP Configurations.
The SMTP configuration parameters and procedures for creating groups and recipients are described in the Mail section of the Job Scheduler API article.
System Mail Configuration
If smtp_id is absent or equals null, the general Job Scheduler mail settings are used. Configure them through the module settings API:
PUT /_core/settings/job-scheduler
{
"email_host": "smtp.example.org",
"email_port": "465",
"email_proto": "ssl",
"email_user": "reports@example.org",
"email_user-email": "reports@example.org",
"email_timeout": 15000
}
The password for the system connection is stored on each node under the jobscheduler.email.pass key.
Test the SMTP Connection
Test the saved SMTP configuration by substituting its identifier:
POST /_core/job_scheduler/smtp/test_smtp/<smtp_id>
For instructions on manually exporting a dashboard, see Exporting to PDF.