metrics
Counts and rates. The `machinemail metrics` commands: arguments, flags, examples and the API routes they call.
Counts and rates.
| Command | Summary |
|---|---|
metrics events | Query events |
metrics rates | Query rates |
metrics usage | Query usage |
Every command also takes the global flags.
metrics events
Query events.
Counts of events per event type over time, in buckets of —period seconds (default one day), over the last 24 hours unless —start and —end say otherwise. message.received includes its sub-types (spam, blocked, unauthenticated, quarantined). At most 100,000 events are counted per query.
Requires the metrics_read permission.
Flags
--inbox <inbox-id>string--pod <pod-id>string-e, --event-types <value>string[]--start <time>string--end <time>string--limit <n>integer--descendingboolean--period <n>integerExamples
API
GET /v0/metrics/eventsGET /v0/inboxes/{inbox_id}/metrics/eventswith--inboxGET /v0/pods/{pod_id}/metrics/eventswith--pod
metrics rates
Query rates.
Rolling bounce and complaint rates. At each —period grid point: the bounced (or complained) messages over the preceding —window, divided by the messages sent over the same window, with the send count alongside. Defaults: the last 24 hours, —period 3600, —window 86400.
Requires the metrics_read permission.
Flags
--inbox <inbox-id>string--pod <pod-id>string--rate-types <value>string[]--start <time>string--end <time>string--limit <n>integer--descendingboolean--period <n>integer--window <n>integerExamples
API
GET /v0/metrics/ratesGET /v0/inboxes/{inbox_id}/metrics/rateswith--inboxGET /v0/pods/{pod_id}/metrics/rateswith--pod
metrics usage
Query usage.
Current usage in the scope. Usage history is not kept yet: each series has a single point, at —end, with the value now.
Requires the metrics_read permission.
Flags
--inbox <inbox-id>string--pod <pod-id>string--usage-types <value>string[]--start <time>string--end <time>string--limit <n>integer--descendingboolean--period <n>integerExamples
API
GET /v0/metrics/usageGET /v0/inboxes/{inbox_id}/metrics/usagewith--inboxGET /v0/pods/{pod_id}/metrics/usagewith--pod