Feat/api metrics (#3531)
* fix: update UI create task instructions. (#3374) * fix: use oss update-task for cloud. Fix update-task instructions. Fix syntax. * feat(api): document /metric path. (#3527, #2567) Co-authored-by: kelseiv <47797004+kelseiv@users.noreply.github.com>pull/3667/head^2
parent
68eedd710e
commit
5fb76b21eb
|
@ -730,16 +730,16 @@ components:
|
||||||
$ref: '#/components/schemas/Links'
|
$ref: '#/components/schemas/Links'
|
||||||
ColorMapping:
|
ColorMapping:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: int
|
type: string
|
||||||
description: >-
|
description: >-
|
||||||
A color mapping is an object that maps time series data to a UI color
|
A color mapping is an object that maps time series data to a UI color
|
||||||
scheme to allow the UI to render graphs consistent colors across
|
scheme to allow the UI to render graphs consistent colors across
|
||||||
reloads.
|
reloads.
|
||||||
example:
|
example:
|
||||||
configcat_deployments-autopromotionblocker: 0
|
configcat_deployments-autopromotionblocker: '#663cd0'
|
||||||
measurement_birdmigration_europe: 0
|
measurement_birdmigration_europe: '#663cd0'
|
||||||
series_id_1: 0
|
series_id_1: '#edf529'
|
||||||
series_id_2: 1
|
series_id_2: '#edf529'
|
||||||
type: object
|
type: object
|
||||||
ColumnDataType:
|
ColumnDataType:
|
||||||
enum:
|
enum:
|
||||||
|
@ -5981,7 +5981,7 @@ components:
|
||||||
For more information and examples, see the following:
|
For more information and examples, see the following:
|
||||||
- [`/authorizations`](#tag/Authorizations) endpoint.
|
- [`/authorizations`](#tag/Authorizations) endpoint.
|
||||||
- [Authorize API requests](/influxdb/cloud/api-guide/api_intro/#authentication).
|
- [Authorize API requests](/influxdb/cloud/api-guide/api_intro/#authentication).
|
||||||
- [Manage API tokens](/influxdb/cloud/security/tokens).
|
- [Manage API tokens](/influxdb/cloud/security/tokens/).
|
||||||
in: header
|
in: header
|
||||||
name: Authorization
|
name: Authorization
|
||||||
type: apiKey
|
type: apiKey
|
||||||
|
@ -12236,7 +12236,7 @@ paths:
|
||||||
InfluxDB validated the request data format and accepted the data for
|
InfluxDB validated the request data format and accepted the data for
|
||||||
writing to the bucket. `204` doesn't indicate a successful write
|
writing to the bucket. `204` doesn't indicate a successful write
|
||||||
operation since writes are asynchronous. See [how to check for write
|
operation since writes are asynchronous. See [how to check for write
|
||||||
errors](https://docs.influxdata.com/influxdb/cloud/write-data/troubleshoot).
|
errors](https://docs.influxdata.com/influxdb/cloud/write-data/troubleshoot/).
|
||||||
'400':
|
'400':
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
@ -12352,7 +12352,7 @@ paths:
|
||||||
description: Internal server error.
|
description: Internal server error.
|
||||||
'503':
|
'503':
|
||||||
description: >-
|
description: >-
|
||||||
The server is temporarily unavailable to accept writes. The
|
The server is temporarily unavailable to accept writes. The
|
||||||
`Retry-After` header describes when to try the write again.
|
`Retry-After` header describes when to try the write again.
|
||||||
headers:
|
headers:
|
||||||
Retry-After:
|
Retry-After:
|
||||||
|
@ -12392,8 +12392,8 @@ tags:
|
||||||
|
|
||||||
For more information and examples, see the following:
|
For more information and examples, see the following:
|
||||||
- [Authorize API requests](/influxdb/cloud/api-guide/api_intro/#authentication).
|
- [Authorize API requests](/influxdb/cloud/api-guide/api_intro/#authentication).
|
||||||
- [Manage API tokens](/influxdb/cloud/security/tokens).
|
- [Manage API tokens](/influxdb/cloud/security/tokens/).
|
||||||
- [Assign a token to a specific user](/influxdb/cloud/security/tokens/create-token).
|
- [Assign a token to a specific user](/influxdb/cloud/security/tokens/create-token/).
|
||||||
name: Authorizations
|
name: Authorizations
|
||||||
- Bucket Schemas
|
- Bucket Schemas
|
||||||
- Buckets
|
- Buckets
|
||||||
|
|
|
@ -36,13 +36,13 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: >-
|
description: >-
|
||||||
Bucket to write to. If none exist a bucket will be created with
|
Bucket to write to. If none exists, a bucket will be created with a
|
||||||
a default 3 day retention policy.
|
default 3-day retention policy.
|
||||||
- in: query
|
- in: query
|
||||||
name: rp
|
name: rp
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
description: The retention policy name.
|
description: Retention policy name.
|
||||||
- in: query
|
- in: query
|
||||||
name: precision
|
name: precision
|
||||||
schema:
|
schema:
|
||||||
|
@ -113,7 +113,7 @@ paths:
|
||||||
format: int32
|
format: int32
|
||||||
'503':
|
'503':
|
||||||
description: >-
|
description: >-
|
||||||
Server is temporarily unavailable to accept writes. The Retry-After
|
Server is temporarily unavailable to accept writes. The Retry-After
|
||||||
header describes when to try the write again.
|
header describes when to try the write again.
|
||||||
headers:
|
headers:
|
||||||
Retry-After:
|
Retry-After:
|
||||||
|
|
|
@ -796,16 +796,16 @@ components:
|
||||||
$ref: '#/components/schemas/Links'
|
$ref: '#/components/schemas/Links'
|
||||||
ColorMapping:
|
ColorMapping:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: int
|
type: string
|
||||||
description: >-
|
description: >-
|
||||||
A color mapping is an object that maps time series data to a UI color
|
A color mapping is an object that maps time series data to a UI color
|
||||||
scheme to allow the UI to render graphs consistent colors across
|
scheme to allow the UI to render graphs consistent colors across
|
||||||
reloads.
|
reloads.
|
||||||
example:
|
example:
|
||||||
configcat_deployments-autopromotionblocker: 0
|
configcat_deployments-autopromotionblocker: '#663cd0'
|
||||||
measurement_birdmigration_europe: 0
|
measurement_birdmigration_europe: '#663cd0'
|
||||||
series_id_1: 0
|
series_id_1: '#edf529'
|
||||||
series_id_2: 1
|
series_id_2: '#edf529'
|
||||||
type: object
|
type: object
|
||||||
ConditionalExpression:
|
ConditionalExpression:
|
||||||
description: >-
|
description: >-
|
||||||
|
@ -8022,13 +8022,13 @@ paths:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/HealthCheck'
|
$ref: '#/components/schemas/HealthCheck'
|
||||||
description: The instance is healthy
|
description: The instance is healthy.
|
||||||
'503':
|
'503':
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/HealthCheck'
|
$ref: '#/components/schemas/HealthCheck'
|
||||||
description: The instance is unhealthy
|
description: The instance is unhealthy.
|
||||||
default:
|
default:
|
||||||
$ref: '#/components/responses/ServerError'
|
$ref: '#/components/responses/ServerError'
|
||||||
description: Unexpected error
|
description: Unexpected error
|
||||||
|
@ -8426,6 +8426,71 @@ paths:
|
||||||
summary: Update a password
|
summary: Update a password
|
||||||
tags:
|
tags:
|
||||||
- Users
|
- Users
|
||||||
|
/metrics:
|
||||||
|
get:
|
||||||
|
operationId: GetMetrics
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/TraceSpan'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
examples:
|
||||||
|
expositionResponse:
|
||||||
|
summary: Metrics in plain text
|
||||||
|
value: >
|
||||||
|
# HELP go_threads Number of OS threads created.
|
||||||
|
|
||||||
|
# TYPE go_threads gauge
|
||||||
|
|
||||||
|
go_threads 19
|
||||||
|
|
||||||
|
# HELP http_api_request_duration_seconds Time taken to
|
||||||
|
respond to HTTP request
|
||||||
|
|
||||||
|
# TYPE http_api_request_duration_seconds histogram
|
||||||
|
|
||||||
|
http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.005"}
|
||||||
|
4
|
||||||
|
|
||||||
|
http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.01"}
|
||||||
|
4
|
||||||
|
|
||||||
|
http_api_request_duration_seconds_bucket{handler="platform",method="GET",path="/:fallback_path",response_code="200",status="2XX",user_agent="curl",le="0.025"}
|
||||||
|
5
|
||||||
|
schema:
|
||||||
|
externalDocs:
|
||||||
|
description: Prometheus exposition formats
|
||||||
|
url: https://prometheus.io/docs/instrumenting/exposition_formats
|
||||||
|
type: Prometheus text-based exposition
|
||||||
|
description: >
|
||||||
|
Payload body contains metrics about the InfluxDB instance.
|
||||||
|
|
||||||
|
|
||||||
|
Metrics are formatted in the
|
||||||
|
|
||||||
|
Prometheus [plain-text exposition
|
||||||
|
format](https://prometheus.io/docs/instrumenting/exposition_formats).
|
||||||
|
|
||||||
|
Each metric is identified by its name and a set of optional
|
||||||
|
key-value pairs.
|
||||||
|
|
||||||
|
|
||||||
|
The following descriptors precede each metric:
|
||||||
|
|
||||||
|
|
||||||
|
- *`HELP`*: description of the metric
|
||||||
|
|
||||||
|
- *`TYPE`*: type of the metric (e.g. `counter`, `gauge`,
|
||||||
|
`histogram`, or `summary`)
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/ServerError'
|
||||||
|
description: Unexpected error
|
||||||
|
servers:
|
||||||
|
- url: ''
|
||||||
|
summary: Get metrics of an instance
|
||||||
|
tags:
|
||||||
|
- Metrics
|
||||||
/api/v2/notificationEndpoints:
|
/api/v2/notificationEndpoints:
|
||||||
get:
|
get:
|
||||||
operationId: GetNotificationEndpoints
|
operationId: GetNotificationEndpoints
|
||||||
|
@ -12816,7 +12881,7 @@ paths:
|
||||||
InfluxDB validated the request data format and accepted the data for
|
InfluxDB validated the request data format and accepted the data for
|
||||||
writing to the bucket. `204` doesn't indicate a successful write
|
writing to the bucket. `204` doesn't indicate a successful write
|
||||||
operation since writes are asynchronous. See [how to check for write
|
operation since writes are asynchronous. See [how to check for write
|
||||||
errors](https://docs.influxdata.com/influxdb/v2.1/write-data/troubleshoot).
|
errors](https://docs.influxdata.com/influxdb/v2.1/write-data/troubleshoot/).
|
||||||
'400':
|
'400':
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
@ -12932,7 +12997,7 @@ paths:
|
||||||
description: Internal server error.
|
description: Internal server error.
|
||||||
'503':
|
'503':
|
||||||
description: >-
|
description: >-
|
||||||
The server is temporarily unavailable to accept writes. The
|
The server is temporarily unavailable to accept writes. The
|
||||||
`Retry-After` header describes when to try the write again.
|
`Retry-After` header describes when to try the write again.
|
||||||
headers:
|
headers:
|
||||||
Retry-After:
|
Retry-After:
|
||||||
|
@ -12973,7 +13038,7 @@ tags:
|
||||||
For more information and examples, see the following:
|
For more information and examples, see the following:
|
||||||
- [Authorize API requests](/influxdb/v2.1/api-guide/api_intro/#authentication).
|
- [Authorize API requests](/influxdb/v2.1/api-guide/api_intro/#authentication).
|
||||||
- [Manage API tokens](/influxdb/v2.1/security/tokens/).
|
- [Manage API tokens](/influxdb/v2.1/security/tokens/).
|
||||||
- [Assign a token to a specific user](/influxdb/v2.1/security/tokens/create-token).
|
- [Assign a token to a specific user](/influxdb/v2.1/security/tokens/create-token/).
|
||||||
name: Authorizations
|
name: Authorizations
|
||||||
- Backup
|
- Backup
|
||||||
- Buckets
|
- Buckets
|
||||||
|
@ -12985,6 +13050,7 @@ tags:
|
||||||
- Health
|
- Health
|
||||||
- Labels
|
- Labels
|
||||||
- Legacy Authorizations
|
- Legacy Authorizations
|
||||||
|
- Metrics
|
||||||
- NotificationEndpoints
|
- NotificationEndpoints
|
||||||
- NotificationRules
|
- NotificationRules
|
||||||
- Organizations
|
- Organizations
|
||||||
|
@ -13118,6 +13184,7 @@ x-tagGroups:
|
||||||
- Health
|
- Health
|
||||||
- Labels
|
- Labels
|
||||||
- Legacy Authorizations
|
- Legacy Authorizations
|
||||||
|
- Metrics
|
||||||
- NotificationEndpoints
|
- NotificationEndpoints
|
||||||
- NotificationRules
|
- NotificationRules
|
||||||
- Organizations
|
- Organizations
|
||||||
|
|
|
@ -36,13 +36,13 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: >-
|
description: >-
|
||||||
The bucket to write to. If none exist a bucket will be created with
|
Bucket to write to. If none exist a bucket will be created with a
|
||||||
a default 3 day retention policy.
|
default 3 day retention policy.
|
||||||
- in: query
|
- in: query
|
||||||
name: rp
|
name: rp
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
description: The retention policy name.
|
description: Retention policy name.
|
||||||
- in: query
|
- in: query
|
||||||
name: precision
|
name: precision
|
||||||
schema:
|
schema:
|
||||||
|
@ -185,12 +185,12 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
description: The bucket to query.
|
description: Bucket to query.
|
||||||
- in: query
|
- in: query
|
||||||
name: rp
|
name: rp
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
description: The retention policy name.
|
description: Retention policy name.
|
||||||
- in: query
|
- in: query
|
||||||
name: q
|
name: q
|
||||||
description: Defines the influxql query to run.
|
description: Defines the influxql query to run.
|
||||||
|
|
Loading…
Reference in New Issue