Knowledge base

Collect telemetry

entries in this scenario: 70
disable-acct-records<domain>criticalDirectiveDisables the creation of accounting records of the chosen types — delivery, bounce, transient failure, queuing failure — for an individual queue.http-accessGlobalcriticalset by the HubDirectiveA list of addresses and access levels for the management interface; closed to everyone by default.http-api-keyGlobalcriticalset by the HubDirectiveA key in the X-API-Key header grants administrator rights from any address; the line is repeatable.record-fields<acct-file>criticalset by the HubDirectiveThe field list for one record type; the default is the star, meaning the default field set marked in the manual’s tables; it supports exclusions and arbitrary message headers.records<acct-file>criticalset by the HubDirectiveA list of eight possible accounting record types; the default is deliveries and local bounces.discard-as-bounce<domain>DirectiveA discard queue still writes to accounting — this line decides with which letter.enable-signalsGlobalDirectiveThe scope of export with three inheritance levels; the subaccount, the tracking domain or the rule list name are appended here too.http-mgmt-portGlobalset by the HubDirectiveThe TCP port of the management interface; the value 0 does not bring up the monitor at all. The default is 8080.http-webhook-url<acct-file>set by the HubDirectiveAn endpoint that receives accounting records over HTTP; the path in the block tag stays and serves as intermediate storage.iso-times<acct-file>DirectiveWhether to write timestamps in ISO format; yes by default.privacy-policy<acct-file>DirectiveReplaces the local part of an address with a placeholder or a hash; the default is to leave it as is.sync<acct-file>DirectiveMakes the operating system flush the accounting file’s buffers regularly; off by default.track-time-first-attemptGlobalset by the HubDirectiveEnables tracking the time of the first attempt; it opens a field in accounting records and a delay metric. Off by default.delete-after<acct-file>set by the HubDirectiveThe retention period of an accounting file before deletion; the default is eight days, and it applies only without moving.http-webhook-extra-headers<acct-file>set by the HubDirectiveA path to a file whose every line is an HTTP header added to the request carrying a batch of records.http-webhook-max-connections<acct-file>DirectiveThe number of threads sending accounting records to the endpoint; the default is one, the ceiling fifty.http-webhook-max-interval<acct-file>set by the HubDirectiveThe interval for collecting records into a batch before sending; the minimum is one minute, the default five.map-header-to-field<acct-file>DirectivePuts the contents of a message header into a ready-made field of the chosen record type; not set by default.max-size<acct-file>set by the HubDirectiveA ceiling at which a new file is started; for a webhook — the maximum batch size.min-free-space<signals>DirectiveBelow this threshold the node starts deleting unsent export files; the default is 20 MB.move-to<acct-file>DirectiveThe destination directory for moving accounting files; by default there is no moving.queue-filter<acct-file>DirectiveA list of queue names with optional negation; by default records of all queues are written.time-first-attempt-domains-file<prometheus-listener>DirectiveA list of receivers, up to a hundred names, for which the first attempt metric gets its own label; the rest fall into other.track-inbound-perf-statsGlobalDirectiveEnables counting the time from MAIL FROM to the end of DATA on acceptance; useful only together with the metrics listener.type<domain>DirectiveOne line that switches the queue between five delivery methods.user-string<acct-file>DirectiveArbitrary text that goes into the userstring field; it works only if that field is listed in the field set.world-readable<acct-file>DirectiveGives all users of the node the right to read new accounting files; no by default.count-moved-records<acct-file>DirectiveAppends the number of records to the log message about moving a CSV file; off by default.http-webhook-ca-file<acct-file>DirectivePath to a PEM file with authority certificates by which the node verifies the endpoint’s certificate.http-webhook-certificate<acct-file>DirectiveA PEM file with the certificate the node presents to the endpoint if the endpoint requests it.http-webhook-connect-timeout<acct-file>DirectiveThe wait limit when connecting to the webhook endpoint; the default is five seconds.http-webhook-io-timeout<acct-file>DirectiveThe wait limit for any exchange operation with the endpoint after the connection is established; the default is five seconds.http-webhook-log-verbose<acct-file>DirectiveAdds messages about sending batches to the engine log, not only about errors; off by default.http-webhook-transfer-encoding<acct-file>DirectiveThe only supported value is gzip; by default the content goes out uncompressed.move-interval<acct-file>DirectiveThe interval for moving the accounting file; the default is a day, and it works only together with a destination directory.retry-interval<acct-file>DirectiveThe interval for restarting the program that receives the records; the default is five minutes, only for the pipe form.time-first-attempt-hires-timestampGlobalDirectiveAdds milliseconds to the first attempt timestamp in accounting records; works only with counting enabled.write-timeout<acct-file>DirectiveThe wait limit for writing to the program, so that an unresponsive collector does not hold up the node; the default is one minute.pmc-acct-min-free-spaceGlobalDirectiveBelow the threshold the engine starts deleting the oldest accounting files accumulated for the management console; deleted data is lost forever.The telemetry contractcriticalMechanismOne block describes the accounting output in full: which record types, which fields, where they go, how files rotate and what gets anonymized.A file, a program or an endpoint — and a file under each of the threecriticalMechanismThree ways to hand off accounting records; an endpoint still has a file underneath, which is deleted only after a successful send, and a non-2xx response triggers a retry.How an accounting record is structuredcriticalMechanismHow an accounting record is structured: the record type in the first column, then the fields, whose composition is configurable.What the node tells about itself and through which channelscriticalMechanismSeven observation surfaces: the web monitor, the console in four formats, the log, accounting, accounting search, metrics and export to external analytics.Two inbound report processors and what to do with themMechanismBounces by message and complaints are parsed by two identically structured blocks; each has its own address list and its own pair of decisions about the message’s fate.Monitor response formatsMechanismThe web monitor serves pages to a person at the address with /ui, and XML or JSON to a program at the same address without the suffix.Accounting sent by the node instead of accounting collected from the nodeMechanismAccounting records can be sent to HTTP endpoints in addition to files and the pipe — not instead of them.Exposing metrics to a collectorMechanismExposing the node’s metrics to an external collector in its format.Command output formatsMechanismNode commands can print not only text but structure too.Node metrics in a standard formatMechanismThe node exposes counters, gauges and summaries in a widely accepted format: traffic, connections, errors, queue depth and delays.CSV or JSON — chosen by the file extension, not by a directiveMechanismRecords are written as comma-separated values with a header line or as JSON objects, one per line; the choice is made by the extension in the path.The vendor's analytics — and what leaves the node for itMechanismA paid service that receives the node’s accounting data and returns analytics, a health score and a spam trap report; it is enabled by scope and stays off until its block exists.The log and accounting — two files and two different questionsMechanismThe engine keeps a separate log and a separate accounting file; the separation is made for the sake of format, performance and the ability to hand over the log without disclosing data.Five ways for a queue to hand off a messageMechanismA queue does not have to use SMTP: it can write to a file, run a program, call over HTTP or discard.Exposing metrics over SNMPMechanismThe node can expose its metrics over SNMP — a second way of monitoring besides the web monitor.<acct-file>Configuration blockOne accounting stream: which records and fields it carries, where it is written, how often it is rotated and how long it is kept.<prometheus-listener>Configuration blockThe block opens a port on the node from which the monitoring system collects metrics in Prometheus format; a node can have only one such block.show statuscriticalCommandPrints the node’s state as a whole: traffic, connections, queue, spool, license.digestCommandComputes the hash of a given string with the chosen method.reset countersCommandResets the statistics counters shown by show status.rotate acctCommandImmediately rotates all accounting files or one named file; the midnight rotation remains.Run a command over the networkcriticalAPI endpointRuns a node console command passed in the request and returns the result as a structure or as text.Return a node filecriticalAPI endpointReturns a log or accounting file by name from the /logs list.The whole node state in one documentcriticalAPI endpointReturns the status page as a structure in XML or JSON: product, license, machine, traffic, connections, resolver, queues, spool and the running flag — in one response.Queues with the most recipientsAPI endpointReturns the top queues — “receiver and sending address” pairs — by number of recipients; the queue parameter narrows the selection.Receivers with the largest queueAPI endpointReturns the recipient domains with the largest queue, summing all sending addresses for each.Delivered — the record everything is counted bycriticalAccounting recordWritten for every recipient whose message the destination server accepted: the outcome, the time, the sending address, the job, transport security and the proxy.Traffic countersMetricRecipients, messages and kilobytes for all time, for the last hour and for the last minute.LogscriticalMonitor screenA list of log and accounting files with download links.Node statusMonitor screenNode state on one page: traffic, peaks, connections with the ceiling, the DNS cache, the spool and queues by delivery method.The node's own logFileThe engine’s own log: startup and shutdown, errors, connection traces and warnings; rotation is automatic, the number of kept files is configurable.