Skip to content

[New] GET /managed/stats #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7374,6 +7374,60 @@ paths:
- lang: CLI
source: >
linode-cli managed service-enable 9994
/managed/stats:
description: |
A collection of managed stats.
x-linode-cli-command: managed
get:
x-linode-grant: unrestricted only
tags:
- Managed
summary: List Managed Stats
description: |
Returns a list of Managed Stats on your Account in the form of x and y data points.
You can use these data points to plot your own graph visualizations. These stats
reflect the last 24 hours of combined usage across all managed Linodes on your account
giving you a high-level snapshot of data for the following:


* cpu
* disk
* swap
* network in
* network out
operationId: getManagedStats
x-linode-cli-action: stats-list
security:
- personalAccessToken: []
- oauth:
- account:read_only
responses:
'200':
description: A list of Managed Stats from the last 24 hours.
content:
application/json:
schema:
type: object
properties:
data:
type: object
oneOf:
- x-linode-ref-name: "Stats Available"
$ref: '#/components/schemas/StatsDataAvailable'
- x-linode-ref-name: "Stats Unavailable"
$ref: '#/components/schemas/StatsDataUnavailable'
discriminator:
propertyName: x-linode-ref-name
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/managed/stats
- lang: CLI
source: >
linode-cli managed stats-list
/networking/ips:
description: >
A collection of IP Addresses on your Account. Excludes private addresses.
Expand Down Expand Up @@ -16461,6 +16515,61 @@ components:
label: Enter the DB password
name: DB_PASSWORD
example: hunter2
StatsDataAvailable:
type: object
description: >
A collection of graph data returned for managed stats.
properties:
cpu:
type: array
description: CPU usage stats from the last 24 hours.
items:
$ref: '#/components/schemas/StatsData'
disk:
type: array
description: Disk usage stats from the last 24 hours.
items:
$ref: '#/components/schemas/StatsData'
swap:
type: array
description: Swap usage stats from the last 24 hours.
items:
$ref: '#/components/schemas/StatsData'
net_in:
type: array
description: Inbound network traffic stats from the last 24 hours.
items:
$ref: '#/components/schemas/StatsData'
net_out:
type: array
description: Outbound network traffic stats from the last 24 hours.
items:
$ref: '#/components/schemas/StatsData'
StatsDataUnavailable:
type: array
readOnly: true
description: >
An array of error messages if managed stats are unavaliable.
items:
type: string
example: Graphs are not yet available.
StatsData:
type: object
description: >
A stat data point.
properties:
x:
type: integer
readOnly: true
description: >
A stats graph data point.
example: 11513761600000
y:
type: integer
readOnly: true
description: >
A stats graph data point.
example: 29.94
SupportTicket:
type: object
description: >
Expand Down