Skip to content

Commit 11087cb

Browse files
Merge pull request #133 from hzoppetti/get-managed-stats
[New] GET /managed/stats
2 parents c5c8d15 + dd2a396 commit 11087cb

File tree

1 file changed

+109
-0
lines changed

1 file changed

+109
-0
lines changed

openapi.yaml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7336,6 +7336,60 @@ paths:
73367336
- lang: CLI
73377337
source: >
73387338
linode-cli managed service-enable 9994
7339+
/managed/stats:
7340+
description: |
7341+
A collection of managed stats.
7342+
x-linode-cli-command: managed
7343+
get:
7344+
x-linode-grant: unrestricted only
7345+
tags:
7346+
- Managed
7347+
summary: List Managed Stats
7348+
description: |
7349+
Returns a list of Managed Stats on your Account in the form of x and y data points.
7350+
You can use these data points to plot your own graph visualizations. These stats
7351+
reflect the last 24 hours of combined usage across all managed Linodes on your account
7352+
giving you a high-level snapshot of data for the following:
7353+
7354+
7355+
* cpu
7356+
* disk
7357+
* swap
7358+
* network in
7359+
* network out
7360+
operationId: getManagedStats
7361+
x-linode-cli-action: stats-list
7362+
security:
7363+
- personalAccessToken: []
7364+
- oauth:
7365+
- account:read_only
7366+
responses:
7367+
'200':
7368+
description: A list of Managed Stats from the last 24 hours.
7369+
content:
7370+
application/json:
7371+
schema:
7372+
type: object
7373+
properties:
7374+
data:
7375+
type: object
7376+
oneOf:
7377+
- x-linode-ref-name: "Stats Available"
7378+
$ref: '#/components/schemas/StatsDataAvailable'
7379+
- x-linode-ref-name: "Stats Unavailable"
7380+
$ref: '#/components/schemas/StatsDataUnavailable'
7381+
discriminator:
7382+
propertyName: x-linode-ref-name
7383+
default:
7384+
$ref: '#/components/responses/ErrorResponse'
7385+
x-code-samples:
7386+
- lang: Shell
7387+
source: >
7388+
curl -H "Authorization: Bearer $TOKEN" \
7389+
https://api.linode.com/v4/managed/stats
7390+
- lang: CLI
7391+
source: >
7392+
linode-cli managed stats-list
73397393
/networking/ips:
73407394
description: >
73417395
A collection of IP Addresses on your Account. Excludes private addresses.
@@ -16403,6 +16457,61 @@ components:
1640316457
label: Enter the DB password
1640416458
name: DB_PASSWORD
1640516459
example: hunter2
16460+
StatsDataAvailable:
16461+
type: object
16462+
description: >
16463+
A collection of graph data returned for managed stats.
16464+
properties:
16465+
cpu:
16466+
type: array
16467+
description: CPU usage stats from the last 24 hours.
16468+
items:
16469+
$ref: '#/components/schemas/StatsData'
16470+
disk:
16471+
type: array
16472+
description: Disk usage stats from the last 24 hours.
16473+
items:
16474+
$ref: '#/components/schemas/StatsData'
16475+
swap:
16476+
type: array
16477+
description: Swap usage stats from the last 24 hours.
16478+
items:
16479+
$ref: '#/components/schemas/StatsData'
16480+
net_in:
16481+
type: array
16482+
description: Inbound network traffic stats from the last 24 hours.
16483+
items:
16484+
$ref: '#/components/schemas/StatsData'
16485+
net_out:
16486+
type: array
16487+
description: Outbound network traffic stats from the last 24 hours.
16488+
items:
16489+
$ref: '#/components/schemas/StatsData'
16490+
StatsDataUnavailable:
16491+
type: array
16492+
readOnly: true
16493+
description: >
16494+
An array of error messages if managed stats are unavaliable.
16495+
items:
16496+
type: string
16497+
example: Graphs are not yet available.
16498+
StatsData:
16499+
type: object
16500+
description: >
16501+
A stat data point.
16502+
properties:
16503+
x:
16504+
type: integer
16505+
readOnly: true
16506+
description: >
16507+
A stats graph data point.
16508+
example: 11513761600000
16509+
y:
16510+
type: integer
16511+
readOnly: true
16512+
description: >
16513+
A stats graph data point.
16514+
example: 29.94
1640616515
SupportTicket:
1640716516
type: object
1640816517
description: >

0 commit comments

Comments
 (0)