Skip to main content

statistics

Creates, updates, deletes, gets or lists a statistics resource.

Overview

Namestatistics
TypeResource
Idlinode.linode.statistics

Fields

The following fields are returned by SELECT queries:

The Linode's statistics for the requested period.

NameDatatypeDescription
cpuarrayPercentage of CPU used.
ioobjectInput/Output statistics.
netv4objectIPv4 statistics.
netv6objectIPv6 statistics.
titlestringThe title for this data set. (example: linode.com - my-linode (linode123456) - day (5 min avg))

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_year_monthselectlinodeId, year, monthReturns CPU, IO, IPv4, and IPv6 statistics for your Linode for a specific month. If the {year} and {month} are set to the current month, the API returns statistics for the past 30 days. OAuth scopes.

<br /> linodes:read_only<br />

Learn more...
getselectlinodeIdReturns CPU, IO, IPv4, and IPv6 statistics for your Linode for the past 24 hours. OAuth scopes.

<br /> linodes:read_only<br />

Learn more...

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
linodeIdstringID of the Linode to look up.
monthstringNumeric value representing the month to look up.
yearstringNumeric value representing the year to look up.

SELECT examples

Returns CPU, IO, IPv4, and IPv6 statistics for your Linode for a specific month. If the &#123;year&#125; and &#123;month&#125; are set to the current month, the API returns statistics for the past 30 days. OAuth scopes.

<br /> linodes:read_only<br />

Learn more...

SELECT
cpu,
io,
netv4,
netv6,
title
FROM linode.linode.statistics
WHERE linodeId = '{{ linodeId }}' -- required
AND year = '{{ year }}' -- required
AND month = '{{ month }}' -- required
;