Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Common URL parameters

These query parameters work on every URL. Service-specific parameters are on each service page. In YAML configuration they can also be written as settings under the URL.

ParameterMeaningTypeDefaultNotes
formatBody format the service receiveschoiceone of text, html, markdown; default: the service’s own
overflowWhat to do with messages over the service’s limitschoiceupstreamone of upstream, truncate, split
verifyVerify TLS certificatesboolyes
redirectFollow HTTP redirectsboolyes
ctoConnect timeout, in secondsfloat5
rtoRead timeout, in secondsfloat30
retryExtra attempts after a retryable failureint, 0 to 100
waitPause before each retry, in secondsfloat, 0 to 200.5
storeUse the persistent store on diskboolyes
tagTags for --tag filteringlistseparated by , or space
tzTime zone namestringan unknown zone rejects the URL; e-mail and syslog dates use it
userUser name; replaces the one in the URLstring
passwordPassword; replaces the one in the URLstringalso pass; secret
portPort; replaces the one in the URLint, 1 to 65535
optionalOptionalboolnoaccepted, no effect
emojisReplace :shortcode: emojiboolnounless the asset turns them off

Boolean values accept yes, true, on, 1, enable, allow and their opposites (no, false, off, 0, disable, deny, never), case-insensitive.

format

The caller declares the input format (mercurio -i markdown, Message::format); mercurio converts it to the service format. A service with one format uses ?format= if given, else its default. A service with several formats uses ?format= if it supports it, else the input format if it supports that, else its default (the first one on its page). See Formats and conversion.

verify, redirect, cto, rto

?verify=no disables certificate checks for that URL (self-signed servers); attachment URLs and HTTP configuration URLs accept it too. To trust a private CA instead, point SSL_CERT_FILE (or REQUESTS_CA_BUNDLE) at a PEM bundle: it replaces the bundled Mozilla roots for every connection, HTTP and socket services alike. The bundle is read once, at the first TLS connection; restart mercurio serve (or your program) after changing it.

Timeouts are decimal seconds (?cto=2.5). A value that is not a number greater than zero falls back to the default.

retry and wait

mercurio -b "disk full" "ntfy://alerts?retry=3&wait=2"

retry above 10 is capped and wait is clamped to 0–20 s. mercurio only repeats an attempt when repeating cannot deliver the message twice. Every error has an ErrorClass (mercurio::Error::class()):

ClassComes fromRetried
RateLimited { retry_after }HTTP 429; HTTP 503 with Retry-Afteryes, after max(wait, Retry-After)
TransientHTTP 408 and 5xx; DNS and connect failures (nothing was sent)yes, after wait
AuthHTTP 401, 403no
InvalidTargetother 4xx; URL, configuration and message errorsno
Unknowntimeouts or resets after the request was sent, failures the service reported, unexpected statusesno
  • An attempt with several errors (one per target) is retried only when every error is RateLimited or Transient.
  • Services that make several requests name the failing step first (login: HTTP 500: server error); the class is that of the underlying error.
  • Retry-After is read as seconds or as an IMF-fixdate HTTP date. Longer than mercurio::service::MAX_RETRY_AFTER (300 s) ends the retries instead of blocking. A 429 without it waits wait; Discord uses its X-RateLimit-Reset instead.
  • Targets and pieces of a split message that an earlier attempt delivered are skipped and reported as delivered. Some services track finer state (Slack channel ids and uploads, Matrix rooms, HumHub post ids, Opsgenie and Jira batches). This tracking lasts one notification and is not written to disk.
  • -v logs each retry (WARNING - ntfy: attempt 1/4 failed; trying again). In the library each attempt is in ReportEntry::attempts.

store

?store=no keeps that URL’s state (login tokens, lookups, sessions) in memory, for as long as the target lives, even when a storage path is set.

tag

?tag=a,b tags a URL given on the command line, in APPRISE_URLS or in the library, so --tag / TagFilter can select it like a configuration entry. In a configuration file the values are added to the entry’s tags.

mercurio -g ops -b "on call" "ntfy://ops-alerts?tag=ops" "ntfy://everyone"   # only the first