API reference
Custom metrics
Custom metrics the organisation sends itself: their definitions, series and limits.
Its operations need the scopes custom_metrics.edit, custom_metrics.view or custom_metrics.delete.
The Custom metric object
Attributes
- uuidstring
The metric’s uuid.
- namestring
The metric’s name.
- descriptionstring or null
The metric’s description; null for none.
- metric_keystring
The key a publisher sends the metric under.
- metric_typestring
countsums events per step,levelis a gauge. - unitstring or null
The unit the metric’s values are measured in; null for none.
- supported_aggregationsarray of strings
The aggregations an alarm on this metric may use, from its type.
- health_statusstring
One of
unknown,healthy,warning,critical.unknowncovers both a metric with no alarm and one whose alarms are not yet evaluated;alarms_counttells them apart. - alarms_countinteger
The metric’s alarms, switched on or off: what
GET /v1/alarmslists for it. - last_received_atinteger or null
Epoch milliseconds. When a point last arrived; null if none ever did.
An instant: epoch milliseconds, UTC. - activeboolean
Whether the metric is switched on.
- approved_atinteger or null
Epoch milliseconds. When the organisation accepted the metric; null while it awaits approval, when no points are stored.
An instant: epoch milliseconds, UTC. - auto_createdboolean
Whether it appeared from a push rather than being declared.
- deactivated_atinteger or null
Epoch milliseconds. When the metric was switched off; null while it is on.
An instant: epoch milliseconds, UTC. - max_points_per_dayinteger
Points accepted a day on the live tier, the limit in force.
- max_backfill_points_per_dayinteger
Points accepted a day on the backfill tier, the limit in force.
- backfill_tier_daysinteger
How many days old a point must be to count against the backfill allowance.
- retention_daysinteger
How many days the samples are kept.
- linked_serversarray of objects or null
The servers the metric is linked to directly; null without
servers.view, the count kept.- uuidstring
The server’s uuid.
- namestring
The server’s name.
- linked_servers_countinteger
How many servers the metric is linked to directly; given even when
linked_serversis null. - linked_server_all_tagsarray of objects
Servers must carry ALL of these tags.
- uuidstring
The tag’s uuid.
- namestring
The tag’s name.
- groupstring or null
The name of the tag’s group; null for a tag in no group.
- linked_server_any_tagsarray of objects
Servers must carry ANY of these tags.
- uuidstring
The tag’s uuid.
- namestring
The tag’s name.
- groupstring or null
The name of the tag’s group; null for a tag in no group.
- metric_sourceobject or null
The source the metric belongs to; null for none.
- uuidstring
The source’s uuid.
- namestring
The source’s name.
- tagsarray of objects
The metric’s own tags.
- uuidstring
The tag’s uuid.
- namestring
The tag’s name.
- created_atinteger or null
Epoch milliseconds. When the metric was created.
An instant: epoch milliseconds, UTC. - console_urlstring
The metric’s page in the console.
Create a custom metric
POST/v1/custom-metrics
Declares a custom metric under a key, in one of the organisation’s metric sources. The key and the source are set here and never change. The metric counts against the organisation’s metric limit, and the call is refused when the plan does not allow it.
Needs the scope custom_metrics.edit.
Headers
- Idempotency-KeystringOptional
Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries
Idempotent-Replayed: true); the same key on a different request is refused 422invalid_request.
Body parameters
- metric_keystringRequired
The key a publisher sends the metric under; required, and fixed once the metric exists.
- namestring or nullOptional
The metric’s display name.
- descriptionstring or nullOptional
A description of the metric, up to 2000 characters; null for none.
- unitstring or nullOptional
The unit the metric’s values are measured in, a free display string such as
files,%ororders; null for none. - metric_typestring or nullOptional
How a point is read:
countsums events per step,levelis a gauge.Values:countlevel(an open set: new values may be added) - metric_source_uuidstring (uuid)Required
The source the metric belongs to.
- max_points_per_dayinteger or nullOptional
Points accepted a day on the live tier, as the metric’s own limit; the ceiling stated, 86,400,000 points a day, is the platform default and an organisation’s override may differ.
- max_backfill_points_per_dayinteger or nullOptional
Points accepted a day on the backfill tier, as the metric’s own limit; the ceiling stated, 86,400,000 points a day, is the platform default and an organisation’s override may differ.
- activeboolean or nullOptional
Whether the metric is switched on.
- tag_uuidsarray of strings or nullOptional
The uuids of the tags to put on the metric.
- linked_server_uuidsarray of strings or nullOptional
The uuids of the servers the metric is shown on, at most 100; an empty list clears them and omitting the key keeps them.
- linked_server_all_tag_uuidsarray of strings or nullOptional
The uuids of server tags a server must ALL carry for the metric to be shown on it, at most 20; an empty list clears them and omitting the key keeps them.
- linked_server_any_tag_uuidsarray of strings or nullOptional
The uuids of server tags a server must carry at least ONE of for the metric to be shown on it, at most 20; an empty list clears them and omitting the key keeps them.
Returns
201 Created:
The created custom metric.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Update a custom metric
PUT/v1/custom-metrics/{custom_metric_uuid}
Changes the fields sent: name, description, unit, type, per-day point limits, whether it is switched on, tags and linked servers. A limit equal to the one in force is not stored, so the metric keeps following the organisation’s. A metric awaiting approval cannot be switched on or off.
Needs the scope custom_metrics.edit.
Headers
- Idempotency-KeystringOptional
Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries
Idempotent-Replayed: true); the same key on a different request is refused 422invalid_request.
Path parameters
- custom_metric_uuidstring (uuid)Required
The uuid of the custom metric in the path.
Body parameters
- namestring or nullOptional
The metric’s display name.
- descriptionstring or nullOptional
A description of the metric, up to 2000 characters; null for none.
- unitstring or nullOptional
The unit the metric’s values are measured in, a free display string such as
files,%ororders; null for none. - metric_typestring or nullOptional
How a point is read:
countsums events per step,levelis a gauge.Values:countlevel(an open set: new values may be added) - max_points_per_dayinteger or nullOptional
Points accepted a day on the live tier, as the metric’s own limit; the ceiling stated, 86,400,000 points a day, is the platform default and an organisation’s override may differ.
- max_backfill_points_per_dayinteger or nullOptional
Points accepted a day on the backfill tier, as the metric’s own limit; the ceiling stated, 86,400,000 points a day, is the platform default and an organisation’s override may differ.
- activeboolean or nullOptional
Whether the metric is switched on.
- tag_uuidsarray of strings or nullOptional
The uuids of the tags to put on the metric.
- linked_server_uuidsarray of strings or nullOptional
The uuids of the servers the metric is shown on, at most 100; an empty list clears them and omitting the key keeps them.
- linked_server_all_tag_uuidsarray of strings or nullOptional
The uuids of server tags a server must ALL carry for the metric to be shown on it, at most 20; an empty list clears them and omitting the key keeps them.
- linked_server_any_tag_uuidsarray of strings or nullOptional
The uuids of server tags a server must carry at least ONE of for the metric to be shown on it, at most 20; an empty list clears them and omitting the key keeps them.
Returns
200 OK:
The custom metric after the update.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Get a custom metric
GET/v1/custom-metrics/{custom_metric_uuid}
Returns one custom metric with its source, tags, linked servers and the limits in force. Linked server names are given only to a key holding servers.view; without it linked_servers is null and the count is kept.
Needs the scope custom_metrics.view.
Path parameters
- custom_metric_uuidstring (uuid)Required
The uuid of the custom metric in the path.
Returns
200 OK:
The custom metric.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
List custom metrics
GET/v1/custom-metrics
Returns the organisation’s custom metrics, filtered by name or key, health, type, source and tags, and sorted as asked. alarms_count says which metrics carry alarms. Pages by page and per_page (limit is the same as per_page); every page carries current_page, per_page, last_page and total.
Needs the scope custom_metrics.view.
Query parameters
- searchstring or nullOptional
Matches the metric’s name or key.
- healtharray of strings or nullOptional
Only metrics in one of these health states:
unknown,healthy,warningorcritical. A list: repeat the parameter (health=unknown&health=healthy) or send one value (health=unknown);health[]=unknownis accepted too.Values:unknownhealthywarningcritical(an open set: new values may be added) - metric_typearray of strings or nullOptional
Only metrics of one of these types:
countorlevel. A list: repeat the parameter (metric_type=count&metric_type=level) or send one value (metric_type=count);metric_type[]=countis accepted too.Values:countlevel(an open set: new values may be added) - metric_source_uuidsarray of strings or nullOptional
Only metrics that belong to one of these sources, by uuid. A list: repeat the parameter (
metric_source_uuids=<uuid>&metric_source_uuids=<uuid>) or send one value (metric_source_uuids=<uuid>);metric_source_uuids[]=<uuid>is accepted too. - tag_uuidsarray of strings or nullOptional
Only metrics carrying one of these tags, by uuid. A list: repeat the parameter (
tag_uuids=<uuid>&tag_uuids=<uuid>) or send one value (tag_uuids=<uuid>);tag_uuids[]=<uuid>is accepted too. - sortstring or nullOptional
The field to order by:
name,metric_key,last_received_atorhealth_status.Values:namemetric_keylast_received_athealth_status(an open set: new values may be added) - directionstring or nullOptional
The sort direction:
ascordesc.Values:ascdesc(an open set: new values may be added) - limitinteger or nullOptional
The same as
per_page, kept for existing clients. - include_totalstring or nullOptional
Ignored:
totalis always present.Values:truefalse10(an open set: new values may be added) - per_pageinteger or nullOptional
The page size, from 1 to 100.
- pageinteger or nullOptional
The page to read, from 1; 1 when omitted. A page past the last answers no rows.
Returns
200 OK:
One page of the organisation’s custom metrics.
Each item of the page:
- uuidstring
The metric’s uuid.
- namestring
The metric’s name.
- metric_keystring
The key a publisher sends the metric under.
- metric_typestring
countsums events per step,levelis a gauge. - unitstring or null
The unit the metric’s values are measured in; null for none.
- health_statusstring
One of
unknown,healthy,warning,critical.unknowncovers both a metric with no alarm and one whose alarms are not yet evaluated;alarms_counttells them apart. - alarms_countinteger
The metric’s alarms, switched on or off: what
GET /v1/alarmslists for it. - last_received_atinteger or null
Epoch milliseconds. When a point last arrived; null if none ever did.
An instant: epoch milliseconds, UTC. - activeboolean
Whether the metric is switched on.
- approved_atinteger or null
Epoch milliseconds. When the organisation accepted the metric; null while it awaits approval, when no points are stored.
An instant: epoch milliseconds, UTC. - auto_createdboolean
Whether it appeared from a push rather than being declared.
- metric_sourceobject or null
The source the metric belongs to; null for none.
- uuidstring
The source’s uuid.
- namestring
The source’s name.
- tagsarray of objects
The metric’s own tags.
- uuidstring
The tag’s uuid.
- namestring
The tag’s name.
- console_urlstring
The metric’s page in the console.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Delete a custom metric
DELETE/v1/custom-metrics/{custom_metric_uuid}
Deletes the custom metric and resolves its open incidents. The answer has no body.
Needs the scope custom_metrics.delete.
Headers
- Idempotency-KeystringOptional
Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries
Idempotent-Replayed: true); the same key on a different request is refused 422invalid_request.
Path parameters
- custom_metric_uuidstring (uuid)Required
The uuid of the custom metric in the path.
Returns
204 No Content:
The custom metric was deleted; there is no body.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Approve a custom metric
POST/v1/custom-metrics/{custom_metric_uuid}/approve
Accepts a metric that appeared from a push, so that its points are stored from then on. The call is refused when the plan does not allow it or the organisation’s metric limit is reached.
Needs the scope custom_metrics.edit.
Headers
- Idempotency-KeystringOptional
Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries
Idempotent-Replayed: true); the same key on a different request is refused 422invalid_request.
Path parameters
- custom_metric_uuidstring (uuid)Required
The uuid of the custom metric in the path.
Returns
200 OK:
The approved custom metric.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Discard a custom metric
POST/v1/custom-metrics/{custom_metric_uuid}/discard
Permanently deletes a metric that still awaits approval, which never stored any points. The answer has no body.
Needs the scope custom_metrics.delete.
Headers
- Idempotency-KeystringOptional
Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries
Idempotent-Replayed: true); the same key on a different request is refused 422invalid_request.
Path parameters
- custom_metric_uuidstring (uuid)Required
The uuid of the custom metric in the path.
Returns
204 No Content:
The custom metric was discarded; there is no body.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Reset a custom metric's series
POST/v1/custom-metrics/{custom_metric_uuid}/reset-series
Deletes all stored points of an approved metric from the metrics store before answering; the metric itself stays. A metric awaiting approval is refused.
Needs the scope custom_metrics.delete.
Headers
- Idempotency-KeystringOptional
Any text of 1 to 255 visible ASCII characters. A repeat of the same request within 24 hours returns the first answer without running again (the response carries
Idempotent-Replayed: true); the same key on a different request is refused 422invalid_request.
Path parameters
- custom_metric_uuidstring (uuid)Required
The uuid of the custom metric in the path.
Returns
200 OK:
The custom metric after its points were deleted.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Get a custom metric's raw samples
GET/v1/custom-metrics/{custom_metric_uuid}/samples
Returns each value pushed for the metric with its own time in epoch milliseconds, oldest first, over a window that defaults to the last hour and spans at most one day. Two samples at one time are both returned. Pages hold up to per_page samples (limit is the same; 1,000 by default, at most 10,000); pass next_cursor back as cursor for the next page, which keeps the first page’s window. Each page first counts the samples left in its window: more than 100,000 is refused with 422 naming the count, and so is a window the store refuses for its own sample limit; ask for a shorter window. A metric awaiting approval stores no samples, so the answer is available: false with reason: awaiting_approval and no samples.
Needs the scope custom_metrics.view.
Path parameters
- custom_metric_uuidstring (uuid)Required
The uuid of the custom metric in the path.
Query parameters
- periodstring or nullOptional
A relative window ending now: 1 to 9999 minutes, hours, days or weeks (
3h,2w). Not withfromandto. The operation names its longest window and its default. - fromstring or nullOptional
The start of a pinned window, epoch milliseconds or RFC 3339 with an offset. Needs
to. A start before the oldest data kept is served from it. - tostring or nullOptional
The end of a pinned window, epoch milliseconds or RFC 3339 with an offset, after
from. A window that ends before the oldest data kept, or in the future, is refused. - limitinteger or nullOptional
The same as
per_page, kept for existing clients. - cursorstring or nullOptional
The
next_cursorof the previous page; omit it for the first page. - per_pageinteger or nullOptional
The number of samples in a page, from 1 to 10,000; 1,000 when omitted.
Returns
200 OK:
One page of the metric’s raw samples.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Get a custom metric's series
GET/v1/custom-metrics/{custom_metric_uuid}/series
Returns the metric’s points over a window, which defaults to the last day and reaches back as far as the metric is kept (1,095 days). Each point summarises the step that ends at its time: with step=1d the point at a day’s 00:00 UTC holds the day before. tz, an IANA time zone name such as Europe/London, puts the 1d points at the zone’s local midnights and the 1w points on its Mondays, each still holding the step that ends at it; a day with a clock change is 23 or 25 hours long, so read each point’s own time rather than multiples of step_seconds, and know that tz=UTC is not the same as no tz (a 1w point sits on Mondays 00:00 UTC, without tz on Thursdays); with any other step tz changes nothing, and the answer gives the tz sent. aggregation chooses how: avg, min, max or last for a level metric, sum for a count one; omitted, a level reads its value at each step and a count its sum. step chooses the width, 30s to 1w, and is refused when it cuts the window into more than 720 points; omitted, it follows the window’s length. A step with no value is a missing point, not a zero. The store reads at most 30,000,000 samples of one metric in a query, so a dense metric’s longest window is shorter (about 300 days at the default 100,000 points a day); beyond it the answer is 422 asking for a shorter window. A metric awaiting approval stores no points, so the answer is available: false with reason: awaiting_approval and an empty series.
Needs the scope custom_metrics.view.
Path parameters
- custom_metric_uuidstring (uuid)Required
The uuid of the custom metric in the path.
Query parameters
- periodstring or nullOptional
A relative window ending now: 1 to 9999 minutes, hours, days or weeks (
3h,2w). Not withfromandto. The operation names its longest window and its default. - fromstring or nullOptional
The start of a pinned window, epoch milliseconds or RFC 3339 with an offset. Needs
to. A start before the oldest data kept is served from it. - tostring or nullOptional
The end of a pinned window, epoch milliseconds or RFC 3339 with an offset, after
from. A window that ends before the oldest data kept, or in the future, is refused. - aggregationstring or nullOptional
How each step summarises the samples inside it:
avg,min,maxorlastfor alevelmetric,sumfor acountone (the metric’ssupported_aggregations). Omitted, a level reads its value at each step and a count its sum.Values:avgminmaxlastsum(an open set: new values may be added) - stepstring or nullOptional
The width of one step:
30s,1m,5m,30m,2h,6h,1dor1w, refused when it cuts the window into more than 720 points. Omitted, the step follows the window’s length.Values:30s1m5m30m2h6h1d1w(an open set: new values may be added) - tzstring or nullOptional
An IANA time zone name such as
Europe/London. With a1dor1wstep (sent, or chosen by the window’s length) each point sits at a local midnight of the zone, and a1wpoint on a Monday’s; with any other step it changes nothing. Omitted, the steps are aligned to UTC as before.
Returns
200 OK:
The metric’s points over the window.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Get a custom metric's summary
GET/v1/custom-metrics/{custom_metric_uuid}/summary
Returns statistics of the metric’s samples over a window, which defaults to the last day and reaches back as far as the metric is kept (1,095 days; an earlier start is served from it): the number of samples, their sum, minimum, maximum, average, median (p50) and 95th percentile (p95), the times of the first and the last sample, and the last value. Each is null when the window holds no sample. A window of 31 days or less reads the samples themselves, and the answer says rolled_up: false; a longer one reads the daily summaries the platform keeps for the whole UTC days up to the start of yesterday and the samples for the rest, and says rolled_up: true: p50 and p95 are then approximated from a histogram of the values, within about 14% of the exact value, and are null when the window holds a negative value, and every other statistic is exact. A metric whose history is not summarised yet answers available: false with reason: rollup_pending; a backfilled value, or a reset, reaches the longer windows within about an hour. A window of 31 days or less that the store refuses because it holds more samples than one query reads (30,000,000 of one metric) answers 422 asking for a shorter window; data denser than the default 100,000 points a day can also end at the read budget with 503 store_unavailable. A metric awaiting approval stores no samples, so the answer is available: false with reason: awaiting_approval and every statistic null.
Needs the scope custom_metrics.view.
Path parameters
- custom_metric_uuidstring (uuid)Required
The uuid of the custom metric in the path.
Query parameters
- periodstring or nullOptional
A relative window ending now: 1 to 9999 minutes, hours, days or weeks (
3h,2w). Not withfromandto. The operation names its longest window and its default. - fromstring or nullOptional
The start of a pinned window, epoch milliseconds or RFC 3339 with an offset. Needs
to. A start before the oldest data kept is served from it. - tostring or nullOptional
The end of a pinned window, epoch milliseconds or RFC 3339 with an offset, after
from. A window that ends before the oldest data kept, or in the future, is refused.
Returns
200 OK:
The metric’s statistics over the window.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.