maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

 1# OpenMetrics/Prometheus telemetry
 2
 3Various server statistics are provided in OpenMetrics format by the
 4"openmetrics" module.
 5
 6To enable it, add the following line to the server config:
 7
 8```
 9openmetrics tcp://127.0.0.1:9749 { }
10```
11
12Scrape endpoint would be `http://127.0.0.1:9749/metrics`.
13
14## Metrics
15
16```
17# AUTH command failures due to invalid credentials.
18maddy_smtp_failed_logins{module}
19# Failed SMTP transaction commands (MAIL, RCPT, DATA).
20maddy_smtp_failed_commands{module, command, smtp_code, smtp_enchcode}
21# Messages rejected with 4xx code due to ratelimiting.
22maddy_smtp_ratelimit_deferred{module}
23# Amount of started SMTP transactions started.
24maddy_smtp_started_transactions{module}
25# Amount of aborted SMTP transactions started.
26maddy_smtp_aborted_transactions{module}
27# Amount of completed SMTP transactions.
28maddy_smtp_completed_transactions{module}
29# Number of times a check returned 'reject' result (may be more than processed
30# messages if check does so on per-recipient basis).
31maddy_check_reject{check}
32# Number of times a check returned 'quarantine' result (may be more than
33# processed messages if check does so on per-recipient basis).
34maddy_check_quarantined{check}
35# Amount of queued messages.
36maddy_queue_length{module, location}
37# Outbound connections established with specific TLS security level.
38maddy_remote_conns_tls_level{module, level}
39# Outbound connections established with specific MX security level.
40maddy_remote_conns_mx_level{module, level}
41```