Knowledge base

<prometheus-listener>

Serving node metrics in a standard format
A third way to find out what is going on with the node

The block opens a separate port from which the monitoring system collects metrics. It appeared in PowerMTA 5.5. The block name is the address and port: 0/0 means all addresses of the machine, and a range can be given too — then the engine takes one matching address and writes which one to the log.

There is only one block per node. Metrics cannot be split by address or served to two systems on different ports.

The format is standard, and that is the main difference from the two other surfaces: the management interface serves its own format, accounting its own, while here it is what a ready-made monitoring system understands without a translator.

What is served is not the same as what the monitor shows. Besides traffic, connections and queue depth, there are error counters split into recipient level and queue level, and two delay summaries — the conversation and the time to the first attempt.

The vendor calls the cost negligible — but with a caveat: it applies to serving the metrics itself, not to track-time-first-attempt, which has its own cost in disk access.

Example configuration
# the whole block is one name line; the content is optional
<prometheus-listener 0/0:9090></prometheus-listener>

# delay values are opened separately, with node-level lines
track-inbound-perf-stats true
track-outbound-perf-stats true
track-time-first-attempt true
The block by itself serves traffic, connections, queue and errors. The three lines below add delay summaries to them — without them the delay metrics are empty.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.