Linode Instances

Statistics View (year/month)

get
https://api.linode.com/v4/linode/instances/{linodeId}/stats/{year}/{month}

Returns statistics for a specific month. The year/month values must be either a date in the past, or the current month. If the current month, statistics will be retrieved for the past 30 days.

Path Parameters

linodeId
Required
integer

ID of the Linode to look up.

year
Required
integer

Numeric value representing the year to look up.

month
Required
integer [1 .. 12]

Numeric value representing the month to look up.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    https://api.linode.com/v4/linode/instances/123/stats/2018/01

Response Samples

{
  "cpu": [],
  "io": {
    "io": "",
    "swap": ""
  },
  "netv4": {
    "in": "",
    "out": "",
    "private_in": "",
    "private_out": ""
  },
  "netv6": {
    "in": "",
    "out": "",
    "private_in": "",
    "private_out": ""
  },
  "title": "linode.com - my-linode (linode123456) - day (5 min avg)"
}

Responses

200: The Linode's statistics for the requested period.

cpu
array of objects

Percentage of CPU used.

io
object

Input/Output statistics.

io
array

Block/s written.

swap
array

Block/s written.

netv4
object

IPv4 statistics.

in
array

Input stats for IPv4, measured in bits/s (bits/second).

out
array

Output stats for IPv4, measured in bits/s (bits/second).

private_in
array

Private IPv4 input statistics, measured in bits/s (bits/second).

private_out
array

Private IPv4 output statistics, measured in bits/s (bits/second).

netv6
object

IPv6 statistics.

in
array

Input stats for IPv6, measured in bits/s (bits/second).

out
array

Output stats for IPv6, measured in bits/s (bits/second).

private_in
array

Private IPv6 input statistics, measured in bits/s (bits/second).

private_out
array

Private IPv6 output statistics, measured in bits/s (bits/second).

title
string

The title for this data set.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.