Knowledge base

http-webhook-max-interval

<acct-file>set by the Hub

How often the node sends the accumulated batch of records
in the configuration this is a linehttp-webhook-max-interval 5minside the block <acct-file>
Telemetry delay is set here

Records do not go out one at a time: they accumulate and are sent in a batch. The line sets how often. The default is 5m, the minimum is 1m.

This is exactly the delay of your analytics. An event that happened right after a batch was sent will reach the receiver a whole interval later. It cannot be set below a minute — that is an engine limitation.

The batch’s second limit is size, max-size. The batch goes out on whichever condition comes first: on a large stream it goes out by size without waiting for the interval.

For regular file accounting the same role belongs to move-interval — the manual specifically notes that for a webhook this line should be used, not that one.

The main trap is setting a long interval to save resources. The savings turn out small, while the data ages by the whole interval. And conversely: a minute with an unavailable receiver means a one-minute retry rhythm, not loss — accumulation happens in intermediate files.
What the Hub does. It writes it — it sets 1m, the minimum possible. The fleet dashboard updates from these batches, and five minutes of delay on it would be visible to the eye.

Next to it is max-size 1M: during a spike the batch goes out by size before the minute is up. Our receiver rejects a body larger than 32 MB with a 413 response, so the margin between 1M and the receiver’s ceiling is thirtyfold.

Recommended values

The interval is chosen by who looks at the data:

Value When
1m (minimum) the data is shown to a person in real time
5m (default) reporting, accumulation in a data store
more the receiver is expensive per request, and freshness is not needed

The batch also goes out by size — max-size sets the second condition.

The 5m default, the 1m minimum and the instruction to use this line instead of move-interval come from the manual (§ 3.3.11.21, § 3.3.11.2). The analysis of our choice and the size margin is based on the Hub’s code.
Example configuration
# the minimum interval — the data goes to a dashboard people watch
<acct-file /var/log/pmta/mtahub-webhook.json>
    http-webhook-url https://hub.example.com/api/telemetry/pmta/7
    http-webhook-max-interval 1m    max-size 1M
</acct-file>
The two lines set two sending conditions. The batch goes out on whichever comes first.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
▲

Common mistakes and problems

what people get wrong and how it ends2 mistakes▶

Configuring the webhook frequency with the move-interval directive

§ 3.3.11.2

What it costsThat line controls moving regular accounting files and does not affect the webhook rhythm. The manual refers to this directive directly.
How to spot itmove-interval is set, but batches still go out once every five minutes.
How to do it rightSet the webhook rhythm with the http-webhook-max-interval line.

Setting a long interval to “take load off the receiver”

our experience

What it costsThe number of requests drops, but each one grows: the same number of records goes out less often and in larger batches. There is hardly any relief, and all the data freshness is lost.
How to spot itThe dashboard shows a picture from half an hour ago.
How to do it rightTake load off the receiver with compression (http-webhook-transfer-encoding), not with the interval.
Compatibility
PowerMTA 6.0
described in the manual of this version · platform: any
The vendor does not state the first version for every directive — there is no note here. The name also appears in the 5.0 edition of the manual.
Reference data
Syntax
http-webhook-max-interval <time-interval>
Values
a time interval, no less than 1m
Default
5m § 3.3.11.21
Applying
reload, no restart needed
Queue
will not touch what is already queued
Where to write it
<acct-file>
How many times
once in the block
Everything here comes from the manual, with the section.
Inheritance
There is no inheritance: the line lives inside its <acct-file>. Different accounting streams can have different intervals — for example, operational telemetry once a minute and a data store export once an hour.
How to check on the node
The sending rhythm is visible from the intermediate files — they appear and disappear at the set frequency:
watch -n5 'ls -la /var/log/pmta/mtahub-webhook*'
The files should appear and disappear. If they only accumulate, the interval is not the problem: the receiver answers something other than 2xx.
In the Hub
Value
The Hub picks it itself — pace, warm-up stage, metrics
Cost of a mistake
reversible: harms only while it is set
Scenarios
Collect telemetry