Skip to content

public.servers.metrics

GET
/servers/{server_uuid}/metrics
curl --request GET \
--url 'https://rest.watchtower15.com/v1/servers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metrics?family=cpu' \
--header 'Authorization: Bearer <token>'
server_uuid
required
string format: uuid
family
required
string
Allowed values: cpu memory load disk network tcp saturation kernel_limits
period
string | null

A relative window ending now: 1 to 9999 minutes, hours, days or weeks (3h, 2w). Not with from and to. The operation names its longest window and its default.

from
string | null

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.

to
string | null

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.

ServersMetricsResource

Media typeapplication/json
object
data
required
ServersMetricsResource
object
server
required
object
uuid
required
string
name
required
string
family
required

One of cpu, memory, load, disk, network, tcp, saturation, kernel_limits.

string
window
required
object
from
required

Epoch milliseconds: the start of the window answered, which can be later than asked for (the store’s floor).

integer
to
required

Epoch milliseconds.

integer
source
required

raw (the hot store, 30 days) or rollup (the hourly rollup).

string
step_seconds
required

The width of one step in seconds: a point is the aggregate of a step.

integer
series
required
Array<object>
object
name
required

The internal series key, e.g. cpu_usage_percent, io_read_mbps.

string
unit
required

One of percent, MB, GB, MB/s, bytes/s, count, per_second; null for a load average.

string | null
labels
required
object
mount
required

The mount point, on a per-mount series.

string | null
device
required

The block device, on a disk I/O series.

string | null
interface
required

The network interface, on a network series.

string | null
state
required

A connection state, a CPU mode, a pressure line or a limit, on the series that split by one.

string | null
cpu
required

A core, cpu0 and on, on a per-core series.

string | null
point_meaning
required

One of peak_per_step, average_per_step, min_per_step, count_per_step, value_per_step: what a point is of its step.

string
points
required

[t, value] pairs, t epoch milliseconds, value a number or null.

Array<Array<number | null>>
oom_kills_in_window
integer
conntrack_loaded
boolean | null
files_host_limited
boolean | null

Example generated

{
"data": {
"server": {
"uuid": "example",
"name": "example"
},
"family": "example",
"window": {
"from": 1,
"to": 1
},
"source": "example",
"step_seconds": 1,
"series": [
{
"name": "example",
"unit": "example",
"labels": {
"mount": "example",
"device": "example",
"interface": "example",
"state": "example",
"cpu": "example"
},
"point_meaning": "example",
"points": [
[
1
]
]
}
],
"oom_kills_in_window": 1,
"conntrack_loaded": true,
"files_host_limited": true
}
}

The API key is missing, malformed, expired or revoked.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

The key or its owner does not hold what the operation needs.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

No such record in this organisation (an absent id and another organisation’s answer alike).

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

The request is invalid; errors names the parameters.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

A rate limit or the organisation’s daily limit is reached; Retry-After says when to retry.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

An unexpected error.

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}

A data store did not answer within the request’s 10 seconds; try again shortly (store_unavailable).

Media typeapplication/problem+json
Problem
object
type
required

https://docs.watchtower15.com/api/errors/<code>/

string format: uri
title
required
string
status
required
integer
code
required
string
detail
required
string
request_id
required
string
errors
object
key
additional properties
Array<string>
limit
integer
used
integer

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"code": "example",
"detail": "example",
"request_id": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"limit": 1,
"used": 1
}