Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Prometheus metrics

GET /api/v1/metrics serves these in Prometheus's text format, for Prometheus, Grafana Agent, Datadog or anything else that scrapes it. It needs a token like every other call: in Prometheus's scrape configuration, metrics_path: /api/v1/metrics and authorization: { credentials: dux_… } (a viewer token: ductus token create prometheus --role viewer).

Counters and histograms count from when the engine started (rate() and increase() handle restarts); queue sizes are read from the database at each scrape. Each destination adds a series per family, so very many destinations mean many series.

MetricTypeLabelsWhat it measures
ductus_start_time_secondsgaugeWhen the engine started (Unix time).
ductus_draininggauge1 while draining or drained (not taking new messages).
ductus_alerts_opengaugeseverityOpen alerts, by severity. Only with alerts: in ductus.yaml.
ductus_alert_send_failures_totalcounterchannelAlert notifications that couldn't be sent (each try counts), by channel (owner: owners' addresses). A failing channel can't alert about itself: watch this.
ductus_certificate_expiry_secondsgaugeside, resource, host, portSeconds until the earliest expiry in a certificate chain (negative once expired): a server's as of its last check (side remote), or one the engine presents (side ours: host is this server, port 0).
ductus_interface_stoppedgaugeinterface1 if the interface was stopped because its code ran away.
ductus_messages_received_totalcounterinterfaceMessages stored and queued.
ductus_messages_duplicate_totalcounterinterfaceMessages stored as duplicates (not queued).
ductus_messages_store_failures_totalcounterinterfaceMessages that couldn't be stored (the sender was told to retry).
ductus_deliveries_totalcounterinterface, destination, outcomeMessages a destination finished, by outcome (sent, filtered, quarantined).
ductus_delivery_retries_totalcounterinterface, destinationTemporary failures (each retry counts).
ductus_delivery_latency_secondshistograminterface, destinationFrom receipt to sent, waiting in the queue included.
ductus_send_secondshistograminterface, destinationEach successful send: the receiver's time.
ductus_transform_secondshistograminterface, destinationThe destination's function, per message.
ductus_queue_pendinggaugeinterface, destinationMessages waiting for a destination.
ductus_queue_quarantinedgaugeinterface, destinationMessages quarantined by a destination (needing a person).
ductus_queue_oldest_secondsgaugeinterface, destinationHow long the oldest message waiting for a destination has waited.
ductus_destination_stategaugeinterface, destination0 ok, 1 behind (past its behind limit), 2 error (quarantined messages), 3 stalled, 4 paused.
ductus_interface_stategaugeinterface0 ok, 1 silent (nothing within active_within), 2 missed (nothing by active_by), 3 stopped.
ductus_destination_pausedgaugeinterface, destination1 while a destination is paused on purpose (ductus pause).
ductus_held_messagesgaugeinterface, statusUnfinished messages past their retention, in the held area (as of the hourly retention run).
ductus_held_bytesgaugeDisk used by the held area (as of the hourly retention run).
ductus_http_request_secondshistograminterfaceRespond-mode HTTP requests: time in the engine.
ductus_http_request_errors_totalcounterinterfaceRespond-mode HTTP requests that failed.
ductus_resource_call_secondshistogramkind, resourceCalls from interface code to a database or API.
ductus_resource_call_errors_totalcounterkind, resourceCalls that failed (network, SQL, timeout).