statistics
Creates, updates, deletes, gets or lists a statistics resource.
Overview
| Name | statistics |
| Type | Resource |
| Id | linode.linode.statistics |
Fields
The following fields are returned by SELECT queries:
- get_by_year_month
- get
The Linode's statistics for the requested period.
| Name | Datatype | Description |
|---|---|---|
cpu | array | Percentage of CPU used. |
io | object | Input/Output statistics. |
netv4 | object | IPv4 statistics. |
netv6 | object | IPv6 statistics. |
title | string | The title for this data set. (example: linode.com - my-linode (linode123456) - day (5 min avg)) |
The Linode's stats for the past 24 hours.
| Name | Datatype | Description |
|---|---|---|
cpu | array | Percentage of CPU used. |
io | object | Input/Output statistics. |
netv4 | object | IPv4 statistics. |
netv6 | object | IPv6 statistics. |
title | string | The title for this data set. (example: linode.com - my-linode (linode123456) - day (5 min avg)) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_by_year_month | select | linodeId, year, month | Returns 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... | |
get | select | linodeId | Returns 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.
| Name | Datatype | Description |
|---|---|---|
linodeId | string | ID of the Linode to look up. |
month | string | Numeric value representing the month to look up. |
year | string | Numeric value representing the year to look up. |
SELECT examples
- get_by_year_month
- get
Returns 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...
SELECT
cpu,
io,
netv4,
netv6,
title
FROM linode.linode.statistics
WHERE linodeId = '{{ linodeId }}' -- required
AND year = '{{ year }}' -- required
AND month = '{{ month }}' -- required
;
Returns CPU, IO, IPv4, and IPv6 statistics for your Linode for the past 24 hours. OAuth scopes.
<br /> linodes:read_only<br />
Learn more...
SELECT
cpu,
io,
netv4,
netv6,
title
FROM linode.linode.statistics
WHERE linodeId = '{{ linodeId }}' -- required
;