mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
chore(slo): update open api spec (#161670)
This commit is contained in:
parent
08a57b9e3a
commit
586e8db0d2
13 changed files with 262 additions and 730 deletions
|
@ -8,269 +8,15 @@ info:
|
|||
license:
|
||||
name: Elastic License 2.0
|
||||
url: https://www.elastic.co/licensing/elastic-license
|
||||
servers:
|
||||
- url: http://localhost:5601
|
||||
description: local
|
||||
security:
|
||||
- basicAuth: []
|
||||
- apiKeyAuth: []
|
||||
tags:
|
||||
- name: slo
|
||||
description: SLO APIs enable you to define, manage and track service-level objectives
|
||||
- name: composite slo
|
||||
description: Composite SLO APIs enable you to define, manage and track a group of SLOs.
|
||||
servers:
|
||||
- url: http://localhost:5601
|
||||
description: local
|
||||
paths:
|
||||
/s/{spaceId}/api/observability/composite_slos:
|
||||
post:
|
||||
summary: Creates a Composite SLO
|
||||
operationId: createCompositeSlo
|
||||
description: |
|
||||
You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.
|
||||
tags:
|
||||
- composite slo
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/kbn_xsrf'
|
||||
- $ref: '#/components/parameters/space_id'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/create_composite_slo_request'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/create_composite_slo_response'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/400_response'
|
||||
'401':
|
||||
description: Unauthorized response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/401_response'
|
||||
'403':
|
||||
description: Unauthorized response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/403_response'
|
||||
'409':
|
||||
description: Conflict - The Composite SLO id already exists
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/409_response'
|
||||
get:
|
||||
summary: Retrieves a paginated list of composite SLOs with summary
|
||||
operationId: findCompositeSlo
|
||||
description: |
|
||||
You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.
|
||||
tags:
|
||||
- composite slo
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/kbn_xsrf'
|
||||
- $ref: '#/components/parameters/space_id'
|
||||
- name: page
|
||||
in: query
|
||||
description: The page number to return
|
||||
schema:
|
||||
type: integer
|
||||
default: 1
|
||||
example: 1
|
||||
- name: perPage
|
||||
in: query
|
||||
description: The number of SLOs to return per page
|
||||
schema:
|
||||
type: integer
|
||||
default: 25
|
||||
example: 20
|
||||
- name: sortBy
|
||||
in: query
|
||||
description: Sort by field
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- creationTime
|
||||
default: creationTime
|
||||
example: creationTime
|
||||
- name: sortDirection
|
||||
in: query
|
||||
description: Sort order
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- asc
|
||||
- desc
|
||||
default: asc
|
||||
example: asc
|
||||
responses:
|
||||
'200':
|
||||
description: Successful request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/find_composite_slo_response'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/400_response'
|
||||
'401':
|
||||
description: Unauthorized response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/401_response'
|
||||
'403':
|
||||
description: Unauthorized response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/403_response'
|
||||
'404':
|
||||
description: Not found response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/404_response'
|
||||
/s/{spaceId}/api/observability/composite_slos/{compositeSloId}:
|
||||
get:
|
||||
summary: Retrieves a composite SLO
|
||||
operationId: getCompositeSlo
|
||||
description: |
|
||||
You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.
|
||||
tags:
|
||||
- composite slo
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/kbn_xsrf'
|
||||
- $ref: '#/components/parameters/space_id'
|
||||
- $ref: '#/components/parameters/composite_slo_id'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/composite_slo_response'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/400_response'
|
||||
'401':
|
||||
description: Unauthorized response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/401_response'
|
||||
'403':
|
||||
description: Unauthorized response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/403_response'
|
||||
'404':
|
||||
description: Not found response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/404_response'
|
||||
put:
|
||||
summary: Updates a composite SLO
|
||||
operationId: updateCompositeSlo
|
||||
description: |
|
||||
You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.
|
||||
tags:
|
||||
- composite slo
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/kbn_xsrf'
|
||||
- $ref: '#/components/parameters/space_id'
|
||||
- $ref: '#/components/parameters/composite_slo_id'
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/update_composite_slo_request'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/base_composite_slo_response'
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/400_response'
|
||||
'401':
|
||||
description: Unauthorized response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/401_response'
|
||||
'403':
|
||||
description: Unauthorized response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/403_response'
|
||||
'404':
|
||||
description: Not found response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/404_response'
|
||||
delete:
|
||||
summary: Deletes a composite SLO
|
||||
operationId: deleteCompositeSlo
|
||||
description: |
|
||||
You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.
|
||||
tags:
|
||||
- composite slo
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/kbn_xsrf'
|
||||
- $ref: '#/components/parameters/space_id'
|
||||
- $ref: '#/components/parameters/composite_slo_id'
|
||||
responses:
|
||||
'204':
|
||||
description: Successful request
|
||||
'400':
|
||||
description: Bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/400_response'
|
||||
'401':
|
||||
description: Unauthorized response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/401_response'
|
||||
'403':
|
||||
description: Unauthorized response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/403_response'
|
||||
'404':
|
||||
description: Not found response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/404_response'
|
||||
/s/{spaceId}/api/observability/slos:
|
||||
post:
|
||||
summary: Creates an SLO.
|
||||
|
@ -685,14 +431,6 @@ components:
|
|||
schema:
|
||||
type: string
|
||||
example: default
|
||||
composite_slo_id:
|
||||
in: path
|
||||
name: compositeSloId
|
||||
description: An identifier for the composite slo.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: 9c235211-6834-11ea-a78c-6feb38a34414
|
||||
slo_id:
|
||||
in: path
|
||||
name: sloId
|
||||
|
@ -702,348 +440,6 @@ components:
|
|||
type: string
|
||||
example: 9c235211-6834-11ea-a78c-6feb38a34414
|
||||
schemas:
|
||||
time_window_rolling:
|
||||
title: Rolling
|
||||
required:
|
||||
- duration
|
||||
- isRolling
|
||||
description: Defines properties for rolling time window
|
||||
type: object
|
||||
properties:
|
||||
duration:
|
||||
description: the duration formatted as {duration}{unit}
|
||||
type: string
|
||||
example: 28d
|
||||
isRolling:
|
||||
description: Indicates a rolling time window
|
||||
type: boolean
|
||||
example: true
|
||||
budgeting_method:
|
||||
title: Budgeting method
|
||||
type: string
|
||||
description: The budgeting method to use when computing the rollup data.
|
||||
enum:
|
||||
- occurrences
|
||||
- timeslices
|
||||
example: occurrences
|
||||
composite_method:
|
||||
title: Composite method
|
||||
type: string
|
||||
description: The composite method to use for the composite SLO.
|
||||
enum:
|
||||
- weightedAverage
|
||||
example: weightedAverage
|
||||
objective:
|
||||
title: Objective
|
||||
required:
|
||||
- target
|
||||
description: Defines properties for the SLO objective
|
||||
type: object
|
||||
properties:
|
||||
target:
|
||||
description: the target objective between 0 and 1 excluded
|
||||
type: number
|
||||
example: 0.99
|
||||
timeslicesTarget:
|
||||
description: the target objective for each slice when using a timeslices budgeting method
|
||||
type: number
|
||||
example: 0.995
|
||||
timeslicesWindow:
|
||||
description: the duration of each slice when using a timeslices budgeting method, as {duraton}{unit}
|
||||
type: string
|
||||
example: 5m
|
||||
weighted_composite_sources:
|
||||
title: Weighted sources
|
||||
description: An array of source SLO to use for the weighted average composite.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- revision
|
||||
- weight
|
||||
properties:
|
||||
id:
|
||||
description: The id of the SLO.
|
||||
type: string
|
||||
example: 8853df00-ae2e-11ed-90af-09bb6422b258
|
||||
revision:
|
||||
description: The revision number of the SLO.
|
||||
type: number
|
||||
example: 2
|
||||
weight:
|
||||
description: The weight to apply to this SLO.
|
||||
type: number
|
||||
example: 3
|
||||
error_budget:
|
||||
title: Error budget
|
||||
type: object
|
||||
properties:
|
||||
initial:
|
||||
type: number
|
||||
description: The initial error budget, as 1 - objective
|
||||
example: 0.02
|
||||
consumed:
|
||||
type: number
|
||||
description: The error budget consummed, as a percentage of the initial value.
|
||||
example: 0.8
|
||||
remaining:
|
||||
type: number
|
||||
description: The error budget remaining, as a percentage of the initial value.
|
||||
example: 0.2
|
||||
isEstimated:
|
||||
type: boolean
|
||||
description: Only for SLO defined with occurrences budgeting method and calendar aligned time window.
|
||||
example: true
|
||||
summary:
|
||||
title: Summary
|
||||
type: object
|
||||
description: The SLO computed data
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum:
|
||||
- NO_DATA
|
||||
- HEALTHY
|
||||
- DEGRADING
|
||||
- VIOLATED
|
||||
example: HEALTHY
|
||||
sliValue:
|
||||
type: number
|
||||
example: 0.9836
|
||||
errorBudget:
|
||||
$ref: '#/components/schemas/error_budget'
|
||||
composite_slo_response:
|
||||
title: Composite SLO with summary response
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
description: The identifier of the composite SLO.
|
||||
type: string
|
||||
example: 8853df00-ae2e-11ed-90af-09bb6422b258
|
||||
name:
|
||||
description: The name of the composite SLO.
|
||||
type: string
|
||||
example: My Service SLO
|
||||
timeWindow:
|
||||
$ref: '#/components/schemas/time_window_rolling'
|
||||
budgetingMethod:
|
||||
$ref: '#/components/schemas/budgeting_method'
|
||||
compositeMethod:
|
||||
$ref: '#/components/schemas/composite_method'
|
||||
objective:
|
||||
$ref: '#/components/schemas/objective'
|
||||
sources:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/weighted_composite_sources'
|
||||
summary:
|
||||
$ref: '#/components/schemas/summary'
|
||||
createdAt:
|
||||
description: The creation date
|
||||
type: string
|
||||
example: '2023-01-12T10:03:19.000Z'
|
||||
updatedAt:
|
||||
description: The last update date
|
||||
type: string
|
||||
example: '2023-01-12T10:03:19.000Z'
|
||||
find_composite_slo_response:
|
||||
title: Find composite SLO response
|
||||
description: A paginated response of composite SLOs matching the query.
|
||||
type: object
|
||||
properties:
|
||||
page:
|
||||
type: number
|
||||
example: 1
|
||||
perPage:
|
||||
type: number
|
||||
example: 25
|
||||
total:
|
||||
type: number
|
||||
example: 34
|
||||
results:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/composite_slo_response'
|
||||
400_response:
|
||||
title: Bad request
|
||||
type: object
|
||||
required:
|
||||
- statusCode
|
||||
- error
|
||||
- message
|
||||
properties:
|
||||
statusCode:
|
||||
type: number
|
||||
example: 400
|
||||
error:
|
||||
type: string
|
||||
example: Bad Request
|
||||
message:
|
||||
type: string
|
||||
example: 'Invalid value ''foo'' supplied to: [...]'
|
||||
401_response:
|
||||
title: Unauthorized
|
||||
type: object
|
||||
required:
|
||||
- statusCode
|
||||
- error
|
||||
- message
|
||||
properties:
|
||||
statusCode:
|
||||
type: number
|
||||
example: 401
|
||||
error:
|
||||
type: string
|
||||
example: Unauthorized
|
||||
message:
|
||||
type: string
|
||||
example: "[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastics] for REST request [/_security/_authenticate]]: unable to authenticate user [elastics] for REST request [/_security/_authenticate]"
|
||||
403_response:
|
||||
title: Unauthorized
|
||||
type: object
|
||||
required:
|
||||
- statusCode
|
||||
- error
|
||||
- message
|
||||
properties:
|
||||
statusCode:
|
||||
type: number
|
||||
example: 403
|
||||
error:
|
||||
type: string
|
||||
example: Unauthorized
|
||||
message:
|
||||
type: string
|
||||
example: "[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastics] for REST request [/_security/_authenticate]]: unable to authenticate user [elastics] for REST request [/_security/_authenticate]"
|
||||
404_response:
|
||||
title: Not found
|
||||
type: object
|
||||
required:
|
||||
- statusCode
|
||||
- error
|
||||
- message
|
||||
properties:
|
||||
statusCode:
|
||||
type: number
|
||||
example: 404
|
||||
error:
|
||||
type: string
|
||||
example: Not Found
|
||||
message:
|
||||
type: string
|
||||
example: SLO [3749f390-03a3-11ee-8139-c7ff60a1692d] not found
|
||||
create_composite_slo_request:
|
||||
title: Create composite SLO request
|
||||
description: |
|
||||
The create Composite SLO API request body. The provided source SLOs must exists and their budgeting method and time window must match the one from the composite SLO.
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- timeWindow
|
||||
- budgetingMethod
|
||||
- compositeMethod
|
||||
- objective
|
||||
- sources
|
||||
properties:
|
||||
id:
|
||||
description: A unique identifier for the composite SLO. Must be between 8 and 36 chars
|
||||
type: string
|
||||
example: my-super-composite-slo-id
|
||||
name:
|
||||
description: A name for the composite SLO.
|
||||
type: string
|
||||
timeWindow:
|
||||
$ref: '#/components/schemas/time_window_rolling'
|
||||
budgetingMethod:
|
||||
$ref: '#/components/schemas/budgeting_method'
|
||||
compositeMethod:
|
||||
$ref: '#/components/schemas/composite_method'
|
||||
objective:
|
||||
$ref: '#/components/schemas/objective'
|
||||
sources:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/weighted_composite_sources'
|
||||
create_composite_slo_response:
|
||||
title: Create composite SLO response
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
example: 8853df00-ae2e-11ed-90af-09bb6422b258
|
||||
409_response:
|
||||
title: Conflict
|
||||
type: object
|
||||
required:
|
||||
- statusCode
|
||||
- error
|
||||
- message
|
||||
properties:
|
||||
statusCode:
|
||||
type: number
|
||||
example: 409
|
||||
error:
|
||||
type: string
|
||||
example: Conflict
|
||||
message:
|
||||
type: string
|
||||
example: SLO [d077e940-1515-11ee-9c50-9d096392f520] already exists
|
||||
update_composite_slo_request:
|
||||
title: Update composite SLO request
|
||||
description: |
|
||||
The update composite SLO API request body. The provided source SLOs must exists and their budgeting method and time window must match the one from the composite SLO.
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
description: A unique identifier for the composite SLO. Must be between 8 and 36 chars
|
||||
type: string
|
||||
example: my-super-composite-slo-id
|
||||
name:
|
||||
description: A name for the composite SLO.
|
||||
type: string
|
||||
timeWindow:
|
||||
$ref: '#/components/schemas/time_window_rolling'
|
||||
budgetingMethod:
|
||||
$ref: '#/components/schemas/budgeting_method'
|
||||
compositeMethod:
|
||||
$ref: '#/components/schemas/composite_method'
|
||||
objective:
|
||||
$ref: '#/components/schemas/objective'
|
||||
sources:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/weighted_composite_sources'
|
||||
base_composite_slo_response:
|
||||
title: Composite SLO response
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
description: The identifier of the composite SLO.
|
||||
type: string
|
||||
example: 8853df00-ae2e-11ed-90af-09bb6422b258
|
||||
name:
|
||||
description: The name of the composite SLO.
|
||||
type: string
|
||||
example: My Service SLO
|
||||
timeWindow:
|
||||
$ref: '#/components/schemas/time_window_rolling'
|
||||
budgetingMethod:
|
||||
$ref: '#/components/schemas/budgeting_method'
|
||||
compositeMethod:
|
||||
$ref: '#/components/schemas/composite_method'
|
||||
objective:
|
||||
$ref: '#/components/schemas/objective'
|
||||
sources:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/weighted_composite_sources'
|
||||
createdAt:
|
||||
description: The creation date
|
||||
type: string
|
||||
example: '2023-01-12T10:03:19.000Z'
|
||||
updatedAt:
|
||||
description: The last update date
|
||||
type: string
|
||||
example: '2023-01-12T10:03:19.000Z'
|
||||
indicator_properties_custom_kql:
|
||||
title: Custom KQL
|
||||
required:
|
||||
|
@ -1248,6 +644,10 @@ components:
|
|||
description: The field of the metric.
|
||||
type: string
|
||||
example: processor.processed
|
||||
filter:
|
||||
description: The filter to apply to the metric.
|
||||
type: string
|
||||
example: 'processor.outcome: "success"'
|
||||
equation:
|
||||
description: The equation to calculate the "good" metric.
|
||||
type: string
|
||||
|
@ -1285,6 +685,10 @@ components:
|
|||
description: The field of the metric.
|
||||
type: string
|
||||
example: processor.processed
|
||||
filter:
|
||||
description: The filter to apply to the metric.
|
||||
type: string
|
||||
example: 'processor.outcome: *'
|
||||
equation:
|
||||
description: The equation to calculate the "total" metric.
|
||||
type: string
|
||||
|
@ -1293,22 +697,52 @@ components:
|
|||
description: The type of indicator.
|
||||
type: string
|
||||
example: sli.metric.custom
|
||||
time_window_calendar_aligned:
|
||||
title: Calendar aligned
|
||||
time_window:
|
||||
title: Time window
|
||||
required:
|
||||
- duration
|
||||
- isCalendar
|
||||
description: Defines properties for calendar aligned time window
|
||||
- type
|
||||
description: Defines properties for the SLO time window
|
||||
type: object
|
||||
properties:
|
||||
duration:
|
||||
description: the duration formatted as {duration}{unit}, accept '1w' (weekly calendar) or '1M' (monthly calendar) only
|
||||
description: 'the duration formatted as {duration}{unit}. Accepted values for rolling: 7d, 30d, 90d. Accepted values for calendar aligned: 1w (weekly) or 1M (monthly)'
|
||||
type: string
|
||||
example: 1M
|
||||
isCalendar:
|
||||
description: Indicates a calendar aligned time window
|
||||
type: boolean
|
||||
example: true
|
||||
example: 30d
|
||||
type:
|
||||
description: Indicates weither the time window is a rolling or a calendar aligned time window.
|
||||
type: string
|
||||
example: rolling
|
||||
enum:
|
||||
- rolling
|
||||
- calendarAligned
|
||||
budgeting_method:
|
||||
title: Budgeting method
|
||||
type: string
|
||||
description: The budgeting method to use when computing the rollup data.
|
||||
enum:
|
||||
- occurrences
|
||||
- timeslices
|
||||
example: occurrences
|
||||
objective:
|
||||
title: Objective
|
||||
required:
|
||||
- target
|
||||
description: Defines properties for the SLO objective
|
||||
type: object
|
||||
properties:
|
||||
target:
|
||||
description: the target objective between 0 and 1 excluded
|
||||
type: number
|
||||
example: 0.99
|
||||
timeslicesTarget:
|
||||
description: the target objective for each slice when using a timeslices budgeting method
|
||||
type: number
|
||||
example: 0.995
|
||||
timeslicesWindow:
|
||||
description: the duration of each slice when using a timeslices budgeting method, as {duraton}{unit}
|
||||
type: string
|
||||
example: 5m
|
||||
settings:
|
||||
title: Settings
|
||||
description: Defines properties for SLO settings.
|
||||
|
@ -1322,6 +756,44 @@ components:
|
|||
description: Configure how often the transform runs, default 1m
|
||||
type: string
|
||||
example: 5m
|
||||
error_budget:
|
||||
title: Error budget
|
||||
type: object
|
||||
properties:
|
||||
initial:
|
||||
type: number
|
||||
description: The initial error budget, as 1 - objective
|
||||
example: 0.02
|
||||
consumed:
|
||||
type: number
|
||||
description: The error budget consummed, as a percentage of the initial value.
|
||||
example: 0.8
|
||||
remaining:
|
||||
type: number
|
||||
description: The error budget remaining, as a percentage of the initial value.
|
||||
example: 0.2
|
||||
isEstimated:
|
||||
type: boolean
|
||||
description: Only for SLO defined with occurrences budgeting method and calendar aligned time window.
|
||||
example: true
|
||||
summary:
|
||||
title: Summary
|
||||
type: object
|
||||
description: The SLO computed data
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum:
|
||||
- NO_DATA
|
||||
- HEALTHY
|
||||
- DEGRADING
|
||||
- VIOLATED
|
||||
example: HEALTHY
|
||||
sliValue:
|
||||
type: number
|
||||
example: 0.9836
|
||||
errorBudget:
|
||||
$ref: '#/components/schemas/error_budget'
|
||||
slo_response:
|
||||
title: SLO response
|
||||
type: object
|
||||
|
@ -1345,9 +817,7 @@ components:
|
|||
- $ref: '#/components/schemas/indicator_properties_apm_latency'
|
||||
- $ref: '#/components/schemas/indicator_properties_custom_metric'
|
||||
timeWindow:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/time_window_rolling'
|
||||
- $ref: '#/components/schemas/time_window_calendar_aligned'
|
||||
$ref: '#/components/schemas/time_window'
|
||||
budgetingMethod:
|
||||
$ref: '#/components/schemas/budgeting_method'
|
||||
objective:
|
||||
|
@ -1391,6 +861,74 @@ components:
|
|||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/slo_response'
|
||||
400_response:
|
||||
title: Bad request
|
||||
type: object
|
||||
required:
|
||||
- statusCode
|
||||
- error
|
||||
- message
|
||||
properties:
|
||||
statusCode:
|
||||
type: number
|
||||
example: 400
|
||||
error:
|
||||
type: string
|
||||
example: Bad Request
|
||||
message:
|
||||
type: string
|
||||
example: 'Invalid value ''foo'' supplied to: [...]'
|
||||
401_response:
|
||||
title: Unauthorized
|
||||
type: object
|
||||
required:
|
||||
- statusCode
|
||||
- error
|
||||
- message
|
||||
properties:
|
||||
statusCode:
|
||||
type: number
|
||||
example: 401
|
||||
error:
|
||||
type: string
|
||||
example: Unauthorized
|
||||
message:
|
||||
type: string
|
||||
example: "[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastics] for REST request [/_security/_authenticate]]: unable to authenticate user [elastics] for REST request [/_security/_authenticate]"
|
||||
403_response:
|
||||
title: Unauthorized
|
||||
type: object
|
||||
required:
|
||||
- statusCode
|
||||
- error
|
||||
- message
|
||||
properties:
|
||||
statusCode:
|
||||
type: number
|
||||
example: 403
|
||||
error:
|
||||
type: string
|
||||
example: Unauthorized
|
||||
message:
|
||||
type: string
|
||||
example: "[security_exception\n\tRoot causes:\n\t\tsecurity_exception: unable to authenticate user [elastics] for REST request [/_security/_authenticate]]: unable to authenticate user [elastics] for REST request [/_security/_authenticate]"
|
||||
404_response:
|
||||
title: Not found
|
||||
type: object
|
||||
required:
|
||||
- statusCode
|
||||
- error
|
||||
- message
|
||||
properties:
|
||||
statusCode:
|
||||
type: number
|
||||
example: 404
|
||||
error:
|
||||
type: string
|
||||
example: Not Found
|
||||
message:
|
||||
type: string
|
||||
example: SLO [3749f390-03a3-11ee-8139-c7ff60a1692d] not found
|
||||
create_slo_request:
|
||||
title: Create SLO request
|
||||
description: |
|
||||
|
@ -1421,9 +959,7 @@ components:
|
|||
- $ref: '#/components/schemas/indicator_properties_apm_latency'
|
||||
- $ref: '#/components/schemas/indicator_properties_custom_metric'
|
||||
timeWindow:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/time_window_rolling'
|
||||
- $ref: '#/components/schemas/time_window_calendar_aligned'
|
||||
$ref: '#/components/schemas/time_window'
|
||||
budgetingMethod:
|
||||
$ref: '#/components/schemas/budgeting_method'
|
||||
objective:
|
||||
|
@ -1439,6 +975,23 @@ components:
|
|||
id:
|
||||
type: string
|
||||
example: 8853df00-ae2e-11ed-90af-09bb6422b258
|
||||
409_response:
|
||||
title: Conflict
|
||||
type: object
|
||||
required:
|
||||
- statusCode
|
||||
- error
|
||||
- message
|
||||
properties:
|
||||
statusCode:
|
||||
type: number
|
||||
example: 409
|
||||
error:
|
||||
type: string
|
||||
example: Conflict
|
||||
message:
|
||||
type: string
|
||||
example: SLO [d077e940-1515-11ee-9c50-9d096392f520] already exists
|
||||
update_slo_request:
|
||||
title: Update SLO request
|
||||
description: |
|
||||
|
@ -1458,9 +1011,7 @@ components:
|
|||
- $ref: '#/components/schemas/indicator_properties_apm_latency'
|
||||
- $ref: '#/components/schemas/indicator_properties_custom_metric'
|
||||
timeWindow:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/time_window_rolling'
|
||||
- $ref: '#/components/schemas/time_window_calendar_aligned'
|
||||
$ref: '#/components/schemas/time_window'
|
||||
budgetingMethod:
|
||||
$ref: '#/components/schemas/budgeting_method'
|
||||
objective:
|
||||
|
@ -1503,3 +1054,6 @@ components:
|
|||
example: 0.9836
|
||||
errorBudget:
|
||||
$ref: '#/components/schemas/error_budget'
|
||||
security:
|
||||
- basicAuth: []
|
||||
- apiKeyAuth: []
|
||||
|
|
|
@ -10,16 +10,16 @@ properties:
|
|||
type: string
|
||||
example: My Service SLO
|
||||
timeWindow:
|
||||
$ref: 'time_window_rolling.yaml'
|
||||
$ref: "time_window.yaml"
|
||||
budgetingMethod:
|
||||
$ref: 'budgeting_method.yaml'
|
||||
$ref: "budgeting_method.yaml"
|
||||
compositeMethod:
|
||||
$ref: 'composite_method.yaml'
|
||||
$ref: "composite_method.yaml"
|
||||
objective:
|
||||
$ref: 'objective.yaml'
|
||||
$ref: "objective.yaml"
|
||||
sources:
|
||||
oneOf:
|
||||
- $ref: 'weighted_composite_sources.yaml'
|
||||
- $ref: "weighted_composite_sources.yaml"
|
||||
createdAt:
|
||||
description: The creation date
|
||||
type: string
|
||||
|
|
|
@ -10,18 +10,18 @@ properties:
|
|||
type: string
|
||||
example: My Service SLO
|
||||
timeWindow:
|
||||
$ref: 'time_window_rolling.yaml'
|
||||
$ref: "time_window.yaml"
|
||||
budgetingMethod:
|
||||
$ref: 'budgeting_method.yaml'
|
||||
$ref: "budgeting_method.yaml"
|
||||
compositeMethod:
|
||||
$ref: 'composite_method.yaml'
|
||||
$ref: "composite_method.yaml"
|
||||
objective:
|
||||
$ref: 'objective.yaml'
|
||||
$ref: "objective.yaml"
|
||||
sources:
|
||||
oneOf:
|
||||
- $ref: 'weighted_composite_sources.yaml'
|
||||
- $ref: "weighted_composite_sources.yaml"
|
||||
summary:
|
||||
$ref: 'summary.yaml'
|
||||
$ref: "summary.yaml"
|
||||
createdAt:
|
||||
description: The creation date
|
||||
type: string
|
||||
|
|
|
@ -18,14 +18,13 @@ properties:
|
|||
description: A name for the composite SLO.
|
||||
type: string
|
||||
timeWindow:
|
||||
$ref: 'time_window_rolling.yaml'
|
||||
$ref: "time_window.yaml"
|
||||
budgetingMethod:
|
||||
$ref: 'budgeting_method.yaml'
|
||||
$ref: "budgeting_method.yaml"
|
||||
compositeMethod:
|
||||
$ref: 'composite_method.yaml'
|
||||
$ref: "composite_method.yaml"
|
||||
objective:
|
||||
$ref: 'objective.yaml'
|
||||
$ref: "objective.yaml"
|
||||
sources:
|
||||
oneOf:
|
||||
- $ref: 'weighted_composite_sources.yaml'
|
||||
|
||||
- $ref: "weighted_composite_sources.yaml"
|
||||
|
|
|
@ -22,17 +22,15 @@ properties:
|
|||
type: string
|
||||
indicator:
|
||||
oneOf:
|
||||
- $ref: 'indicator_properties_custom_kql.yaml'
|
||||
- $ref: 'indicator_properties_apm_availability.yaml'
|
||||
- $ref: 'indicator_properties_apm_latency.yaml'
|
||||
- $ref: 'indicator_properties_custom_metric.yaml'
|
||||
- $ref: "indicator_properties_custom_kql.yaml"
|
||||
- $ref: "indicator_properties_apm_availability.yaml"
|
||||
- $ref: "indicator_properties_apm_latency.yaml"
|
||||
- $ref: "indicator_properties_custom_metric.yaml"
|
||||
timeWindow:
|
||||
oneOf:
|
||||
- $ref: 'time_window_rolling.yaml'
|
||||
- $ref: 'time_window_calendar_aligned.yaml'
|
||||
$ref: "time_window.yaml"
|
||||
budgetingMethod:
|
||||
$ref: 'budgeting_method.yaml'
|
||||
$ref: "budgeting_method.yaml"
|
||||
objective:
|
||||
$ref: 'objective.yaml'
|
||||
$ref: "objective.yaml"
|
||||
settings:
|
||||
$ref: 'settings.yaml'
|
||||
$ref: "settings.yaml"
|
||||
|
|
|
@ -50,7 +50,7 @@ properties:
|
|||
description: The name of the metric. Only valid options are A-Z
|
||||
type: string
|
||||
example: A
|
||||
pattern: '^[A-Z]$'
|
||||
pattern: "^[A-Z]$"
|
||||
aggregation:
|
||||
description: The aggregation type of the metric. Only valid option is "sum"
|
||||
type: string
|
||||
|
@ -63,7 +63,7 @@ properties:
|
|||
filter:
|
||||
description: The filter to apply to the metric.
|
||||
type: string
|
||||
example: processor.outcome: "success"
|
||||
example: 'processor.outcome: "success"'
|
||||
equation:
|
||||
description: The equation to calculate the "good" metric.
|
||||
type: string
|
||||
|
@ -90,7 +90,7 @@ properties:
|
|||
description: The name of the metric. Only valid options are A-Z
|
||||
type: string
|
||||
example: A
|
||||
pattern: '^[A-Z]$'
|
||||
pattern: "^[A-Z]$"
|
||||
aggregation:
|
||||
description: The aggregation type of the metric. Only valid option is "sum"
|
||||
type: string
|
||||
|
@ -103,7 +103,7 @@ properties:
|
|||
filter:
|
||||
description: The filter to apply to the metric.
|
||||
type: string
|
||||
example: processor.outcome: *
|
||||
example: "processor.outcome: *"
|
||||
equation:
|
||||
description: The equation to calculate the "total" metric.
|
||||
type: string
|
||||
|
|
|
@ -15,26 +15,24 @@ properties:
|
|||
example: My SLO description
|
||||
indicator:
|
||||
oneOf:
|
||||
- $ref: 'indicator_properties_custom_kql.yaml'
|
||||
- $ref: 'indicator_properties_apm_availability.yaml'
|
||||
- $ref: 'indicator_properties_apm_latency.yaml'
|
||||
- $ref: 'indicator_properties_custom_metric.yaml'
|
||||
- $ref: "indicator_properties_custom_kql.yaml"
|
||||
- $ref: "indicator_properties_apm_availability.yaml"
|
||||
- $ref: "indicator_properties_apm_latency.yaml"
|
||||
- $ref: "indicator_properties_custom_metric.yaml"
|
||||
timeWindow:
|
||||
oneOf:
|
||||
- $ref: 'time_window_rolling.yaml'
|
||||
- $ref: 'time_window_calendar_aligned.yaml'
|
||||
$ref: "time_window.yaml"
|
||||
budgetingMethod:
|
||||
$ref: 'budgeting_method.yaml'
|
||||
$ref: "budgeting_method.yaml"
|
||||
objective:
|
||||
$ref: 'objective.yaml'
|
||||
$ref: "objective.yaml"
|
||||
settings:
|
||||
$ref: 'settings.yaml'
|
||||
$ref: "settings.yaml"
|
||||
revision:
|
||||
description: The SLO revision
|
||||
type: number
|
||||
example: 2
|
||||
summary:
|
||||
$ref: 'summary.yaml'
|
||||
$ref: "summary.yaml"
|
||||
enabled:
|
||||
description: Indicate if the SLO is enabled
|
||||
type: boolean
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
title: Time window
|
||||
required:
|
||||
- duration
|
||||
- type
|
||||
description: Defines properties for the SLO time window
|
||||
type: object
|
||||
properties:
|
||||
duration:
|
||||
description: "the duration formatted as {duration}{unit}. Accepted values for rolling: 7d, 30d, 90d. Accepted values for calendar aligned: 1w (weekly) or 1M (monthly)"
|
||||
type: string
|
||||
example: 30d
|
||||
type:
|
||||
description: Indicates weither the time window is a rolling or a calendar aligned time window.
|
||||
type: string
|
||||
example: "rolling"
|
||||
enum: ["rolling", "calendarAligned"]
|
|
@ -1,15 +0,0 @@
|
|||
title: Calendar aligned
|
||||
required:
|
||||
- duration
|
||||
- isCalendar
|
||||
description: Defines properties for calendar aligned time window
|
||||
type: object
|
||||
properties:
|
||||
duration:
|
||||
description: the duration formatted as {duration}{unit}, accept '1w' (weekly calendar) or '1M' (monthly calendar) only
|
||||
type: string
|
||||
example: 1M
|
||||
isCalendar:
|
||||
description: Indicates a calendar aligned time window
|
||||
type: boolean
|
||||
example: true
|
|
@ -1,15 +0,0 @@
|
|||
title: Rolling
|
||||
required:
|
||||
- duration
|
||||
- isRolling
|
||||
description: Defines properties for rolling time window
|
||||
type: object
|
||||
properties:
|
||||
duration:
|
||||
description: the duration formatted as {duration}{unit}
|
||||
type: string
|
||||
example: 28d
|
||||
isRolling:
|
||||
description: Indicates a rolling time window
|
||||
type: boolean
|
||||
example: true
|
|
@ -11,14 +11,13 @@ properties:
|
|||
description: A name for the composite SLO.
|
||||
type: string
|
||||
timeWindow:
|
||||
$ref: 'time_window_rolling.yaml'
|
||||
$ref: "time_window.yaml"
|
||||
budgetingMethod:
|
||||
$ref: 'budgeting_method.yaml'
|
||||
$ref: "budgeting_method.yaml"
|
||||
compositeMethod:
|
||||
$ref: 'composite_method.yaml'
|
||||
$ref: "composite_method.yaml"
|
||||
objective:
|
||||
$ref: 'objective.yaml'
|
||||
$ref: "objective.yaml"
|
||||
sources:
|
||||
oneOf:
|
||||
- $ref: 'weighted_composite_sources.yaml'
|
||||
|
||||
- $ref: "weighted_composite_sources.yaml"
|
||||
|
|
|
@ -12,17 +12,15 @@ properties:
|
|||
type: string
|
||||
indicator:
|
||||
oneOf:
|
||||
- $ref: 'indicator_properties_custom_kql.yaml'
|
||||
- $ref: 'indicator_properties_apm_availability.yaml'
|
||||
- $ref: 'indicator_properties_apm_latency.yaml'
|
||||
- $ref: 'indicator_properties_custom_metric.yaml'
|
||||
- $ref: "indicator_properties_custom_kql.yaml"
|
||||
- $ref: "indicator_properties_apm_availability.yaml"
|
||||
- $ref: "indicator_properties_apm_latency.yaml"
|
||||
- $ref: "indicator_properties_custom_metric.yaml"
|
||||
timeWindow:
|
||||
oneOf:
|
||||
- $ref: 'time_window_rolling.yaml'
|
||||
- $ref: 'time_window_calendar_aligned.yaml'
|
||||
$ref: "time_window.yaml"
|
||||
budgetingMethod:
|
||||
$ref: 'budgeting_method.yaml'
|
||||
$ref: "budgeting_method.yaml"
|
||||
objective:
|
||||
$ref: 'objective.yaml'
|
||||
$ref: "objective.yaml"
|
||||
settings:
|
||||
$ref: 'settings.yaml'
|
||||
$ref: "settings.yaml"
|
||||
|
|
|
@ -2,7 +2,7 @@ openapi: 3.0.1
|
|||
info:
|
||||
title: SLOs
|
||||
description: OpenAPI schema for SLOs endpoints
|
||||
version: '1.0'
|
||||
version: "1.0"
|
||||
contact:
|
||||
name: Actionable Observability Team
|
||||
license:
|
||||
|
@ -14,23 +14,23 @@ tags:
|
|||
- name: composite slo
|
||||
description: Composite SLO APIs enable you to define, manage and track a group of SLOs.
|
||||
servers:
|
||||
- url: 'http://localhost:5601'
|
||||
- url: "http://localhost:5601"
|
||||
description: local
|
||||
paths:
|
||||
'/s/{spaceId}/api/observability/composite_slos':
|
||||
$ref: 'paths/s@{spaceid}@api@composite_slos.yaml'
|
||||
'/s/{spaceId}/api/observability/composite_slos/{compositeSloId}':
|
||||
$ref: 'paths/s@{spaceid}@api@composite_slos@{compositesloid}.yaml'
|
||||
'/s/{spaceId}/api/observability/slos':
|
||||
$ref: 'paths/s@{spaceid}@api@slos.yaml'
|
||||
'/s/{spaceId}/api/observability/slos/{sloId}':
|
||||
$ref: 'paths/s@{spaceid}@api@slos@{sloid}.yaml'
|
||||
'/s/{spaceId}/api/observability/slos/{sloId}/enable':
|
||||
$ref: 'paths/s@{spaceid}@api@slos@{sloid}@{enable}.yaml'
|
||||
'/s/{spaceId}/api/observability/slos/{sloId}/disable':
|
||||
$ref: 'paths/s@{spaceid}@api@slos@{sloid}@{disable}.yaml'
|
||||
'/s/{spaceId}/internal/observability/slos/_historical_summary':
|
||||
$ref: 'paths/s@{spaceid}@api@slos@_historical_summary.yaml'
|
||||
#'/s/{spaceId}/api/observability/composite_slos':
|
||||
# $ref: 'paths/s@{spaceid}@api@composite_slos.yaml'
|
||||
#'/s/{spaceId}/api/observability/composite_slos/{compositeSloId}':
|
||||
# $ref: 'paths/s@{spaceid}@api@composite_slos@{compositesloid}.yaml'
|
||||
"/s/{spaceId}/api/observability/slos":
|
||||
$ref: "paths/s@{spaceid}@api@slos.yaml"
|
||||
"/s/{spaceId}/api/observability/slos/{sloId}":
|
||||
$ref: "paths/s@{spaceid}@api@slos@{sloid}.yaml"
|
||||
"/s/{spaceId}/api/observability/slos/{sloId}/enable":
|
||||
$ref: "paths/s@{spaceid}@api@slos@{sloid}@{enable}.yaml"
|
||||
"/s/{spaceId}/api/observability/slos/{sloId}/disable":
|
||||
$ref: "paths/s@{spaceid}@api@slos@{sloid}@{disable}.yaml"
|
||||
"/s/{spaceId}/internal/observability/slos/_historical_summary":
|
||||
$ref: "paths/s@{spaceid}@api@slos@_historical_summary.yaml"
|
||||
components:
|
||||
securitySchemes:
|
||||
basicAuth:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue