Skip to content

Operator report

The operator report is a weekly email that summarises the previous 7 days of a deployment for its operators, such as a purchasing or finance team. It is built from sections that apps register. The first section lists purchase orders.

Turning it on

  1. Set OPERATOR_REPORT_EMAILS to a comma-separated list of addresses. Empty means no report.
  2. Enable the structure.operator_report notification under Administration → Notifications. Like every notification it is off by default, and without it nothing is sent.
  3. Optionally set OPERATOR_REPORT_DAY_OF_WEEK (default Monday) and OPERATOR_REPORT_MAX_EMAIL_SIZE_MB (default 10).

All three settings are in the "Operator report" group of the settings page. Only staff can change them.

When it is sent and what it covers

A daily job runs at 10:00 UTC and sends the report only on the configured day, so the local time shifts with daylight saving. The report covers the 7 days before that day, from 00:00 UTC seven days earlier up to 00:00 UTC on the report day. The subject names the period. A week with nothing to report sends no email, and the report is sent at most once per day.

Purchase orders section

Turn on include_purchase_orders_in_operator_report for each offering whose purchase orders should be reported. Only staff can change it.

The section lists the orders of those offerings that were approved during the period and have a purchase order document, except rejected and cancelled ones. Approved orders whose provisioning later failed are included, with their state. Each row gives the organization, project, offering and plan, requester, creation and approval dates, state, type, cost and a link to the order, and the document is attached as <date>_<project>_<order>.pdf, dated by the order's creation.

An order counts as approved once it leaves review, to wait for its start date or to start executing. Until then its purchase order can still be uploaded, replaced or removed; after it the document is final. So every purchase order is reported once, in the week its order is approved, however long after the order was placed it was uploaded. Orders still under review wait for a later report.

Approval times are recorded from the upgrade that introduced this report on. Orders that had already finished by then are never reported. Orders still in flight at the upgrade are stamped, and reported once, when they next reach an approved state: one waiting for review when it is approved, one waiting for its start date when it starts executing, and one already executing when it completes. For the last two, the approval date in the report is that later date, not the original approval.

A purchase order whose file is missing from storage is listed as missing, with the order link, and not attached; a warning naming the order is logged.

Size limit and numbered emails

OPERATOR_REPORT_MAX_EMAIL_SIZE_MB caps each email, measured as sent, so it includes the roughly one-third growth that encoding adds to attachments. When the attachments do not all fit, the first email carries the full report and as many documents as fit. Further emails are numbered (2/3), (3/3) and list only the documents they carry. A document larger than about 70% of the cap is listed as "too large to attach", with a link to the order, since encoding and the report body would push it over. The size is measured with the CRLF line endings that mail servers count.

Set the cap below the smallest limit of the receiving mail servers. A server that rejects an email after Waldur's mail relay has accepted it sends a bounce to the sender address, and Waldur does not see it.

Re-sending a week

If the job did not run on the report day, or the mail server refused an email (logged as a warning that names the period and the part), send that week again with:

1
waldur shell -c 'from waldur_core.structure.digest_tasks import send_operator_report; send_operator_report(period_end="2026-11-30", force=True)'

period_end is the report day, and force skips the day check and the once-per-day guard. It sends every part of that week's report to every recipient again, not only a part that was refused.

Adding a section

Subclass BaseOperatorReportSection from waldur_core.structure.operator_report in <app>/operator_report.py, implement get_section_data(period_start, period_end, max_attachment_bytes), and call register_section. The module is discovered at startup. Return None when there is nothing for the period, so the section is left out.