Karta. PromEx. Mail
(Karta v1.0.0)
Metrics of the mail Karta moves, and of what it decides about it.
Counted as they happen (Karta.Metrics):
karta_delivery_outcome_recipients{server, outcome, class, code}- the recipients of outgoing mail by what became of their last attempt (delivered,deferred,bounced), its enhanced status class (4.2,5.1, ...) and its reply code. The share that isdeferredis the delivery deferral rate:sum(rate(karta_delivery_outcome_recipients{outcome="deferred"}[5m])) / sum(rate(karta_delivery_outcome_recipients[5m]))karta_delivery_tls_deliveries{server, policy, result}- the TLS a delivery ran under, by the policy that decided it (dane,mta-sts,verified,opportunistic, ...) and the version negotiated (nonewhen it went in clear).karta_smtp_refusals{listener, code, class}- the replies of 4xx and 5xx the SMTP listeners sent, including a policy refusal at the end ofDATAand the452for a client that names too many recipients.karta_smtp_connections{listener, result}- connections accepted and refused.karta_smtp_auth_attempts{listener, mechanism, result}- AUTH attempts by mechanism and result;result="failed"is a wrong credential,"temporary"a directory that could not answer.karta_auth_spf_checks{identity, result},karta_auth_dkim_signatures{result}andkarta_auth_dmarc_checks{result, policy}- what the checks of received mail found.karta_scan_runs{spam, virus}andkarta_scan_duration_milliseconds{spam, virus}- the spam and virus scan's result and latency ("timeout"when the budget ran out).karta_dns_lookups{type, cache, result}andkarta_dns_duration_milliseconds{type, cache, result}- DNS answers from the cache (hit) and from the resolver (miss), and the lookups that failed.karta_webhook_attempts{server, result, state}andkarta_webhook_duration_milliseconds{server, result, state}- the webhook requests by answer class, and the delivery's state after the attempt (failedis a dead letter).karta_bounce_reports{server, kind, class}andkarta_complaint_reports{server, feedback_type}- the reports received at the return path, each counted once however often it arrives.karta_report_sent_reports{kind, result}- the reports Karta sends about domains (Karta.Reports.Sending), by result:sent,limited,failed,skippedorretry.
Read from the database every 30 seconds (Karta.Metrics.Report):
karta_outbound_queue_recipients{server, queue, status}- the outgoing recipients waiting for a server and its queue;karta_outbound_queue_age_seconds{server, queue, status}- how long the oldest due recipient has waited: mail that should have been tried and was not;karta_inbound_deliveries{server, status}- received messages waiting for their endpoint (pending) or held (held);karta_webhook_backlog_deliveries{server, state}- webhook deliveries pending, and failed (dead letters);karta_suppressions_entries{server, reason}- the addresses a server suppresses that are still in force.
A server is its id. The server label is the server's UUID —
never its name, its slug or a domain — so a metric, a dashboard or a
backup of them holds no customer's name; the admin pages map an id to
its server. The other labels are a closed set (Karta.Metrics), so
what a remote server, a domain's records or a scanner says cannot make
an unbounded number of series.
The dashboard is priv/grafana/karta-mail.json; the alert rules are
priv/prometheus/karta-mail-alerts.yml.