Add InfluxDB 2.0.9 release notes and new influxd flux-log-enabled option (#3170)
parent
76200fb9f8
commit
5f84fb79f8
|
@ -0,0 +1,11 @@
|
|||
lint:
|
||||
extends:
|
||||
- recommended
|
||||
plugins:
|
||||
- './plugins/servers-plugin.js'
|
||||
rules:
|
||||
no-server-trailing-slash: off
|
||||
servers/validate-servers-url: error
|
||||
decorators:
|
||||
servers/replace-servers-url: error
|
||||
servers/set-servers-url: error
|
|
@ -1,6 +1,7 @@
|
|||
## Generate InfluxDB API docs
|
||||
InfluxDB uses [Redoc](https://github.com/Redocly/redoc/) and
|
||||
[redoc-cli](https://github.com/Redocly/redoc/blob/master/cli/README.md) to generate
|
||||
InfluxDB uses [Redoc](https://github.com/Redocly/redoc/),
|
||||
[redoc-cli](https://github.com/Redocly/redoc/blob/master/cli/README.md),
|
||||
and Redocly's [OpenApi CLI](https://redoc.ly/docs/cli/) to generate
|
||||
API documentation from the InfluxDB `swagger.yml`.
|
||||
|
||||
To minimize repo size, the generated API documentation HTML is gitignored, therefore
|
||||
|
@ -12,15 +13,20 @@ to generate version-specific API documentation.
|
|||
The structure versions swagger files using the following pattern:
|
||||
|
||||
```
|
||||
│ └── swagger.yml
|
||||
└── etc...
|
||||
```
|
||||
|
||||
### OpenAPI CLI configuration
|
||||
`.redoc.yaml` sets linting and bundling options for `openapi` CLI.
|
||||
`./plugins` contains custom OpenAPI CLI plugins composed of *rules* (for linting) and *decorators* (for bundle customization).
|
||||
api-docs/
|
||||
├── v2.0/
|
||||
│ └── swagger.yml
|
||||
├── v2.1/
|
||||
│ └── swagger.yml
|
||||
├── v2.2/
|
||||
│ └── swagger.yml
|
||||
└── etc...
|
||||
```
|
||||
`openapi` CLI requires that modules use CommonJS `require` syntax for imports.
|
||||
|
||||
### Generate API docs locally
|
||||
Because the API documentation HTML is gitignored, you must manually generate it
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,4 @@
|
|||
# this is a manually maintained file for these old routes until oats#15 is resolved
|
||||
openapi: "3.0.0"
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: Influx API Service (V1 compatible endpoints)
|
||||
version: 0.1.0
|
||||
|
@ -8,7 +7,7 @@ servers:
|
|||
description: V1 compatible api endpoints.
|
||||
paths:
|
||||
/write:
|
||||
post: # technically this functions with other methods as well
|
||||
post:
|
||||
operationId: PostWriteV1
|
||||
tags:
|
||||
- Write
|
||||
|
@ -21,15 +20,17 @@ paths:
|
|||
schema:
|
||||
type: string
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/TraceSpan"
|
||||
- $ref: "#/components/parameters/AuthUserV1"
|
||||
- $ref: "#/components/parameters/AuthPassV1"
|
||||
- $ref: '#/components/parameters/TraceSpan'
|
||||
- $ref: '#/components/parameters/AuthUserV1'
|
||||
- $ref: '#/components/parameters/AuthPassV1'
|
||||
- in: query
|
||||
name: db
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: The bucket to write to. If none exist a bucket will be created with a default 3 day retention policy.
|
||||
description: >-
|
||||
The bucket to write to. If none exist a bucket will be created with
|
||||
a default 3 day retention policy.
|
||||
- in: query
|
||||
name: rp
|
||||
schema:
|
||||
|
@ -42,54 +43,76 @@ paths:
|
|||
description: Write precision.
|
||||
- in: header
|
||||
name: Content-Encoding
|
||||
description: When present, its value indicates to the database that compression is applied to the line-protocol body.
|
||||
description: >-
|
||||
When present, its value indicates to the database that compression
|
||||
is applied to the line-protocol body.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
|
||||
description: >-
|
||||
Specifies that the line protocol in the body is encoded with gzip
|
||||
or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
responses:
|
||||
"204":
|
||||
description: Write data is correctly formatted and accepted for writing to the bucket.
|
||||
"400":
|
||||
description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written.
|
||||
'204':
|
||||
description: >-
|
||||
Write data is correctly formatted and accepted for writing to the
|
||||
bucket.
|
||||
'400':
|
||||
description: >-
|
||||
Line protocol poorly formed and no points were written. Response
|
||||
can be used to determine the first malformed line in the body
|
||||
line-protocol. All data in body was rejected and not written.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/LineProtocolError"
|
||||
"401":
|
||||
description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist.
|
||||
$ref: '#/components/schemas/LineProtocolError'
|
||||
'401':
|
||||
description: >-
|
||||
Token does not have sufficient permissions to write to this
|
||||
organization and bucket or the organization and bucket do not exist.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
"403":
|
||||
$ref: '#/components/schemas/Error'
|
||||
'403':
|
||||
description: No token was sent and they are required.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
"413":
|
||||
description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written.
|
||||
$ref: '#/components/schemas/Error'
|
||||
'413':
|
||||
description: >-
|
||||
Write has been rejected because the payload is too large. Error
|
||||
message returns max size supported. All data in body was rejected
|
||||
and not written.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/LineProtocolLengthError"
|
||||
"429":
|
||||
description: Token is temporarily over quota. The Retry-After header describes when to try the write again.
|
||||
$ref: '#/components/schemas/LineProtocolLengthError'
|
||||
'429':
|
||||
description: >-
|
||||
Token is temporarily over quota. The Retry-After header describes
|
||||
when to try the write again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
description: >-
|
||||
A non-negative decimal integer indicating the seconds to delay
|
||||
after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
"503":
|
||||
description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again.
|
||||
'503':
|
||||
description: >-
|
||||
Server is temporarily unavailable to accept writes. The Retry-After
|
||||
header describes when to try the write again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
description: >-
|
||||
A non-negative decimal integer indicating the seconds to delay
|
||||
after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
|
@ -98,9 +121,9 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
/query:
|
||||
post: # technically this functions with other methods as well
|
||||
post:
|
||||
operationId: PostQueryV1
|
||||
tags:
|
||||
- Query
|
||||
|
@ -108,18 +131,21 @@ paths:
|
|||
requestBody:
|
||||
description: InfluxQL query to execute.
|
||||
content:
|
||||
text/plain: # although this should be `application/vnd.influxql`, oats breaks so we define the content-type header parameter
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/TraceSpan"
|
||||
- $ref: "#/components/parameters/AuthUserV1"
|
||||
- $ref: "#/components/parameters/AuthPassV1"
|
||||
- $ref: '#/components/parameters/TraceSpan'
|
||||
- $ref: '#/components/parameters/AuthUserV1'
|
||||
- $ref: '#/components/parameters/AuthPassV1'
|
||||
- in: header
|
||||
name: Accept
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies how query results should be encoded in the response. **Note:** With `application/csv`, query results include epoch timestamps instead of RFC3339 timestamps.
|
||||
description: >-
|
||||
Specifies how query results should be encoded in the response.
|
||||
**Note:** With `application/csv`, query results include epoch
|
||||
timestamps instead of RFC3339 timestamps.
|
||||
default: application/json
|
||||
enum:
|
||||
- application/json
|
||||
|
@ -128,10 +154,15 @@ paths:
|
|||
- application/x-msgpack
|
||||
- in: header
|
||||
name: Accept-Encoding
|
||||
description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.
|
||||
description: >-
|
||||
The Accept-Encoding request HTTP header advertises which content
|
||||
encoding, usually a compression algorithm, the client is able to
|
||||
understand.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity.
|
||||
description: >-
|
||||
Specifies that the query response in the body should be encoded
|
||||
with gzip or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
|
@ -148,42 +179,53 @@ paths:
|
|||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Query results
|
||||
headers:
|
||||
Content-Encoding:
|
||||
description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body
|
||||
description: >-
|
||||
The Content-Encoding entity header is used to compress the
|
||||
media-type. When present, its value indicates which encodings
|
||||
were applied to the entity-body
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the response in the body is encoded with gzip or not encoded with identity.
|
||||
description: >-
|
||||
Specifies that the response in the body is encoded with gzip
|
||||
or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
Trace-Id:
|
||||
description: The Trace-Id header reports the request's trace ID, if one was generated.
|
||||
description: >-
|
||||
The Trace-Id header reports the request's trace ID, if one was
|
||||
generated.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies the request's trace ID.
|
||||
content:
|
||||
application/csv:
|
||||
schema:
|
||||
$ref: "#/components/schemas/InfluxQLCSVResponse"
|
||||
$ref: '#/components/schemas/InfluxQLCSVResponse'
|
||||
text/csv:
|
||||
schema:
|
||||
$ref: "#/components/schemas/InfluxQLCSVResponse"
|
||||
$ref: '#/components/schemas/InfluxQLCSVResponse'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/InfluxQLResponse"
|
||||
$ref: '#/components/schemas/InfluxQLResponse'
|
||||
application/x-msgpack:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
"429":
|
||||
description: Token is temporarily over quota. The Retry-After header describes when to try the read again.
|
||||
'429':
|
||||
description: >-
|
||||
Token is temporarily over quota. The Retry-After header describes
|
||||
when to try the read again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
description: >-
|
||||
A non-negative decimal integer indicating the seconds to delay
|
||||
after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
|
@ -192,7 +234,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
components:
|
||||
parameters:
|
||||
TraceSpan:
|
||||
|
@ -200,8 +242,8 @@ components:
|
|||
name: Zap-Trace-Span
|
||||
description: OpenTracing span context
|
||||
example:
|
||||
trace_id: "1"
|
||||
span_id: "1"
|
||||
trace_id: '1'
|
||||
span_id: '1'
|
||||
baggage:
|
||||
key: value
|
||||
required: false
|
||||
|
@ -260,7 +302,6 @@ components:
|
|||
description: Code is the machine-readable error code.
|
||||
readOnly: true
|
||||
type: string
|
||||
# This set of enumerations must remain in sync with the constants defined in errors.go
|
||||
enum:
|
||||
- internal error
|
||||
- not found
|
||||
|
@ -277,7 +318,9 @@ components:
|
|||
readOnly: true
|
||||
description: Message is a human-readable message.
|
||||
type: string
|
||||
required: [code, message]
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
LineProtocolError:
|
||||
properties:
|
||||
code:
|
||||
|
@ -297,18 +340,26 @@ components:
|
|||
type: string
|
||||
op:
|
||||
readOnly: true
|
||||
description: Op describes the logical code operation during error. Useful for debugging.
|
||||
description: >-
|
||||
Op describes the logical code operation during error. Useful for
|
||||
debugging.
|
||||
type: string
|
||||
err:
|
||||
readOnly: true
|
||||
description: Err is a stack of errors that occurred during processing of the request. Useful for debugging.
|
||||
description: >-
|
||||
Err is a stack of errors that occurred during processing of the
|
||||
request. Useful for debugging.
|
||||
type: string
|
||||
line:
|
||||
readOnly: true
|
||||
description: First line within sent body containing malformed data
|
||||
type: integer
|
||||
format: int32
|
||||
required: [code, message, op, err]
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
- op
|
||||
- err
|
||||
LineProtocolLengthError:
|
||||
properties:
|
||||
code:
|
||||
|
@ -326,4 +377,7 @@ components:
|
|||
description: Max length in bytes for a body of line-protocol.
|
||||
type: integer
|
||||
format: int32
|
||||
required: [code, message, maxLength]
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
- maxLength
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash -e
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Get list of versions from directory names
|
||||
versions="$(ls -d -- */ | grep -v 'node_modules')"
|
||||
versions="$(ls -d -- */ | grep -v 'node_modules' | grep -v 'plugins')"
|
||||
|
||||
for version in $versions
|
||||
do
|
||||
|
@ -57,10 +57,10 @@ weight: 304
|
|||
--options.sortPropsAlphabetically \
|
||||
--options.menuToggle \
|
||||
--options.hideHostname \
|
||||
--options.noAutoAuth \
|
||||
--templateOptions.version="$version" \
|
||||
--templateOptions.titleVersion="$titleVersion" \
|
||||
|
||||
|
||||
# Use Redoc to generate the v1 compatibility API html
|
||||
npm_config_yes=true npx $redocCLI bundle $version/swaggerV1Compat.yml \
|
||||
-t template.hbs \
|
||||
|
@ -72,7 +72,6 @@ weight: 304
|
|||
--templateOptions.titleVersion="$titleVersion" \
|
||||
--output=redoc-static-v1-compat.html \
|
||||
|
||||
|
||||
# Create temp file with frontmatter and Redoc html
|
||||
echo "$v2frontmatter" >> $version.tmp
|
||||
echo "$v1frontmatter" >> $version-v1-compat.tmp
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
module.exports = ReplaceRootURL;
|
||||
|
||||
/** @type {import('@redocly/openapi-cli').OasDecorator} */
|
||||
|
||||
/**
|
||||
* Returns an object with keys in [node type, any, ref].
|
||||
* The key instructs openapi when to invoke the key's Visitor object.
|
||||
* Object key "Server" is an OAS 3.0 node type.
|
||||
*/
|
||||
function ReplaceRootURL() {
|
||||
return {
|
||||
Operation: {
|
||||
leave(operation, ctx) {
|
||||
if(Array.isArray(operation.servers)) {
|
||||
operation.servers.forEach(server => server.url = server.url === '' ? '/' : server.url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,21 @@
|
|||
module.exports = SetServersURL;
|
||||
|
||||
/** @type {import('@redocly/openapi-cli').OasDecorator} */
|
||||
|
||||
/**
|
||||
* Returns an object with keys in [node type, any, ref].
|
||||
* The key instructs openapi when to invoke the key's Visitor object.
|
||||
* Object key "Server" is an OAS 3.0 node type.
|
||||
*/
|
||||
function SetServersURL() {
|
||||
return {
|
||||
Operation: {
|
||||
leave(operation, ctx) {
|
||||
const operations = ['GetRoutes']
|
||||
if(operations.includes(operation.operationId)) {
|
||||
operation.servers = [{url: '/'}];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,19 @@
|
|||
module.exports = ValidateServersUrl
|
||||
|
||||
/**
|
||||
* Detects Operations that have servers.url: ''.
|
||||
*/
|
||||
/** @type {import('@redocly/openapi-cli').OasRule} */
|
||||
function ValidateServersUrl() {
|
||||
return {
|
||||
Operation(operation, ctx) {
|
||||
if(Array.isArray(operation.servers)) {
|
||||
operation.servers.forEach(server => server.url === '' &&
|
||||
ctx.report({
|
||||
message: `operation server has empty url`,
|
||||
location: ctx.location.child('operationId')
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
const ReplaceServersUrl = require('./decorators/replace-servers-url');
|
||||
const SetServersUrl = require('./decorators/set-servers-url');
|
||||
const ValidateServersUrl = require('./rules/validate-servers-url');
|
||||
const id = 'servers';
|
||||
|
||||
/** @type {import('@redocly/openapi-cli').CustomRulesConfig} */
|
||||
const rules = {
|
||||
oas3: {
|
||||
'validate-servers-url': ValidateServersUrl
|
||||
}
|
||||
}
|
||||
|
||||
/** @type {import('@redocly/openapi-cli').CustomRulesConfig} */
|
||||
const decorators = {
|
||||
oas3: {
|
||||
'replace-servers-url': ReplaceServersUrl,
|
||||
'set-servers-url': SetServersUrl
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
id,
|
||||
configs: {
|
||||
all: {rules, decorators},
|
||||
},
|
||||
rules,
|
||||
decorators
|
||||
};
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,4 @@
|
|||
# this is a manually maintained file for these old routes until oats#15 is resolved
|
||||
openapi: "3.0.0"
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: Influx API Service (V1 compatible endpoints)
|
||||
version: 0.1.0
|
||||
|
@ -8,7 +7,7 @@ servers:
|
|||
description: V1 compatible api endpoints.
|
||||
paths:
|
||||
/write:
|
||||
post: # technically this functions with other methods as well
|
||||
post:
|
||||
operationId: PostWriteV1
|
||||
tags:
|
||||
- Write
|
||||
|
@ -21,15 +20,17 @@ paths:
|
|||
schema:
|
||||
type: string
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/TraceSpan"
|
||||
- $ref: "#/components/parameters/AuthUserV1"
|
||||
- $ref: "#/components/parameters/AuthPassV1"
|
||||
- $ref: '#/components/parameters/TraceSpan'
|
||||
- $ref: '#/components/parameters/AuthUserV1'
|
||||
- $ref: '#/components/parameters/AuthPassV1'
|
||||
- in: query
|
||||
name: db
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: The bucket to write to. If none exist a bucket will be created with a default 3 day retention policy.
|
||||
description: >-
|
||||
The bucket to write to. If none exist a bucket will be created with
|
||||
a default 3 day retention policy.
|
||||
- in: query
|
||||
name: rp
|
||||
schema:
|
||||
|
@ -42,54 +43,76 @@ paths:
|
|||
description: Write precision.
|
||||
- in: header
|
||||
name: Content-Encoding
|
||||
description: When present, its value indicates to the database that compression is applied to the line-protocol body.
|
||||
description: >-
|
||||
When present, its value indicates to the database that compression
|
||||
is applied to the line-protocol body.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
|
||||
description: >-
|
||||
Specifies that the line protocol in the body is encoded with gzip
|
||||
or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
responses:
|
||||
"204":
|
||||
description: Write data is correctly formatted and accepted for writing to the bucket.
|
||||
"400":
|
||||
description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written.
|
||||
'204':
|
||||
description: >-
|
||||
Write data is correctly formatted and accepted for writing to the
|
||||
bucket.
|
||||
'400':
|
||||
description: >-
|
||||
Line protocol poorly formed and no points were written. Response
|
||||
can be used to determine the first malformed line in the body
|
||||
line-protocol. All data in body was rejected and not written.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/LineProtocolError"
|
||||
"401":
|
||||
description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist.
|
||||
$ref: '#/components/schemas/LineProtocolError'
|
||||
'401':
|
||||
description: >-
|
||||
Token does not have sufficient permissions to write to this
|
||||
organization and bucket or the organization and bucket do not exist.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
"403":
|
||||
$ref: '#/components/schemas/Error'
|
||||
'403':
|
||||
description: No token was sent and they are required.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
"413":
|
||||
description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written.
|
||||
$ref: '#/components/schemas/Error'
|
||||
'413':
|
||||
description: >-
|
||||
Write has been rejected because the payload is too large. Error
|
||||
message returns max size supported. All data in body was rejected
|
||||
and not written.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/LineProtocolLengthError"
|
||||
"429":
|
||||
description: Token is temporarily over quota. The Retry-After header describes when to try the write again.
|
||||
$ref: '#/components/schemas/LineProtocolLengthError'
|
||||
'429':
|
||||
description: >-
|
||||
Token is temporarily over quota. The Retry-After header describes
|
||||
when to try the write again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
description: >-
|
||||
A non-negative decimal integer indicating the seconds to delay
|
||||
after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
"503":
|
||||
description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again.
|
||||
'503':
|
||||
description: >-
|
||||
Server is temporarily unavailable to accept writes. The Retry-After
|
||||
header describes when to try the write again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
description: >-
|
||||
A non-negative decimal integer indicating the seconds to delay
|
||||
after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
|
@ -98,9 +121,9 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
/query:
|
||||
post: # technically this functions with other methods as well
|
||||
post:
|
||||
operationId: PostQueryV1
|
||||
tags:
|
||||
- Query
|
||||
|
@ -108,18 +131,21 @@ paths:
|
|||
requestBody:
|
||||
description: InfluxQL query to execute.
|
||||
content:
|
||||
text/plain: # although this should be `application/vnd.influxql`, oats breaks so we define the content-type header parameter
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/TraceSpan"
|
||||
- $ref: "#/components/parameters/AuthUserV1"
|
||||
- $ref: "#/components/parameters/AuthPassV1"
|
||||
- $ref: '#/components/parameters/TraceSpan'
|
||||
- $ref: '#/components/parameters/AuthUserV1'
|
||||
- $ref: '#/components/parameters/AuthPassV1'
|
||||
- in: header
|
||||
name: Accept
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies how query results should be encoded in the response. **Note:** With `application/csv`, query results include epoch timestamps instead of RFC3339 timestamps.
|
||||
description: >-
|
||||
Specifies how query results should be encoded in the response.
|
||||
**Note:** With `application/csv`, query results include epoch
|
||||
timestamps instead of RFC3339 timestamps.
|
||||
default: application/json
|
||||
enum:
|
||||
- application/json
|
||||
|
@ -128,10 +154,15 @@ paths:
|
|||
- application/x-msgpack
|
||||
- in: header
|
||||
name: Accept-Encoding
|
||||
description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.
|
||||
description: >-
|
||||
The Accept-Encoding request HTTP header advertises which content
|
||||
encoding, usually a compression algorithm, the client is able to
|
||||
understand.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity.
|
||||
description: >-
|
||||
Specifies that the query response in the body should be encoded
|
||||
with gzip or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
|
@ -148,42 +179,53 @@ paths:
|
|||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Query results
|
||||
headers:
|
||||
Content-Encoding:
|
||||
description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body
|
||||
description: >-
|
||||
The Content-Encoding entity header is used to compress the
|
||||
media-type. When present, its value indicates which encodings
|
||||
were applied to the entity-body
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the response in the body is encoded with gzip or not encoded with identity.
|
||||
description: >-
|
||||
Specifies that the response in the body is encoded with gzip
|
||||
or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
Trace-Id:
|
||||
description: The Trace-Id header reports the request's trace ID, if one was generated.
|
||||
description: >-
|
||||
The Trace-Id header reports the request's trace ID, if one was
|
||||
generated.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies the request's trace ID.
|
||||
content:
|
||||
application/csv:
|
||||
schema:
|
||||
$ref: "#/components/schemas/InfluxQLCSVResponse"
|
||||
$ref: '#/components/schemas/InfluxQLCSVResponse'
|
||||
text/csv:
|
||||
schema:
|
||||
$ref: "#/components/schemas/InfluxQLCSVResponse"
|
||||
$ref: '#/components/schemas/InfluxQLCSVResponse'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/InfluxQLResponse"
|
||||
$ref: '#/components/schemas/InfluxQLResponse'
|
||||
application/x-msgpack:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
"429":
|
||||
description: Token is temporarily over quota. The Retry-After header describes when to try the read again.
|
||||
'429':
|
||||
description: >-
|
||||
Token is temporarily over quota. The Retry-After header describes
|
||||
when to try the read again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
description: >-
|
||||
A non-negative decimal integer indicating the seconds to delay
|
||||
after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
|
@ -192,7 +234,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
components:
|
||||
parameters:
|
||||
TraceSpan:
|
||||
|
@ -200,8 +242,8 @@ components:
|
|||
name: Zap-Trace-Span
|
||||
description: OpenTracing span context
|
||||
example:
|
||||
trace_id: "1"
|
||||
span_id: "1"
|
||||
trace_id: '1'
|
||||
span_id: '1'
|
||||
baggage:
|
||||
key: value
|
||||
required: false
|
||||
|
@ -260,7 +302,6 @@ components:
|
|||
description: Code is the machine-readable error code.
|
||||
readOnly: true
|
||||
type: string
|
||||
# This set of enumerations must remain in sync with the constants defined in errors.go
|
||||
enum:
|
||||
- internal error
|
||||
- not found
|
||||
|
@ -277,7 +318,9 @@ components:
|
|||
readOnly: true
|
||||
description: Message is a human-readable message.
|
||||
type: string
|
||||
required: [code, message]
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
LineProtocolError:
|
||||
properties:
|
||||
code:
|
||||
|
@ -297,18 +340,26 @@ components:
|
|||
type: string
|
||||
op:
|
||||
readOnly: true
|
||||
description: Op describes the logical code operation during error. Useful for debugging.
|
||||
description: >-
|
||||
Op describes the logical code operation during error. Useful for
|
||||
debugging.
|
||||
type: string
|
||||
err:
|
||||
readOnly: true
|
||||
description: Err is a stack of errors that occurred during processing of the request. Useful for debugging.
|
||||
description: >-
|
||||
Err is a stack of errors that occurred during processing of the
|
||||
request. Useful for debugging.
|
||||
type: string
|
||||
line:
|
||||
readOnly: true
|
||||
description: First line within sent body containing malformed data
|
||||
type: integer
|
||||
format: int32
|
||||
required: [code, message, op, err]
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
- op
|
||||
- err
|
||||
LineProtocolLengthError:
|
||||
properties:
|
||||
code:
|
||||
|
@ -326,4 +377,7 @@ components:
|
|||
description: Max length in bytes for a body of line-protocol.
|
||||
type: integer
|
||||
format: int32
|
||||
required: [code, message, maxLength]
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
- maxLength
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
# yarn lockfile v1
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -15,11 +15,7 @@ related:
|
|||
introduced: 0.92.0
|
||||
---
|
||||
|
||||
The `influxdb.cardinality()` function returns the [series cardinality](/{{< latest "influxdb" "v2" >}}/reference/glossary#series-cardinality) of data stored in InfluxDB Cloud.
|
||||
|
||||
{{% cloud %}}
|
||||
**InfluxDB Cloud** supports the `influxdb.cardinality()` function, but **InfluxDB OSS does not**.
|
||||
{{% /cloud %}}
|
||||
The `influxdb.cardinality()` function returns the [series cardinality](/{{< latest "influxdb" "v2" >}}/reference/glossary#series-cardinality) of a specified dataset.
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb"
|
||||
|
|
|
@ -87,7 +87,6 @@ tls-key = "/path/to/influxdb.key"
|
|||
Only non-default settings need to be defined in the configuration file.
|
||||
{{% /note %}}
|
||||
|
||||
|
||||
## Configuration options
|
||||
|
||||
To configure InfluxDB, use the following configuration options when starting the
|
||||
|
@ -97,6 +96,7 @@ To configure InfluxDB, use the following configuration options when starting the
|
|||
- [bolt-path](#bolt-path)
|
||||
- [e2e-testing](#e2e-testing)
|
||||
- [engine-path](#engine-path)
|
||||
- [flux-log-enabled](#flux-log-enabled)
|
||||
- [http-bind-address](#http-bind-address)
|
||||
- [http-idle-timeout](#http-idle-timeout)
|
||||
- [http-read-header-timeout](#http-read-header-timeout)
|
||||
|
@ -345,6 +345,64 @@ engine-path = "/users/user/.influxdbv2/engine"
|
|||
|
||||
---
|
||||
|
||||
### flux-log-enabled
|
||||
|
||||
Include option to show detailed logs for Flux queries, including the following log fields:
|
||||
|
||||
- `compiler_type`: Compiler used for processing the query (will always be Flux).
|
||||
- `response_size`: Size of the response, in bytes.
|
||||
- `query`: The textual representation of the query.
|
||||
- `err`: Errors encountered while processing the query.
|
||||
- `stat_total_duration`: Total duration to process the query.
|
||||
- `stat_compile_duration`: Duration to compile the query.
|
||||
- `stat_execute_duration`: Duration to execute the query.
|
||||
- `stat_max_allocated`: Maximum amount of memory allocated while processing the query, in - bytes.
|
||||
- `stat_total_allocated`: Total amount of memory allocated while processing the query, in bytes. This includes memory that was freed and then used again.
|
||||
|
||||
**Default:** `false`
|
||||
|
||||
| influxd flag | Environment variable | Configuration key |
|
||||
|:------------ |:-------------------- |:----------------- |
|
||||
| `--flux-log-enabled` | `INFLUXD_FLUX_LOG_ENABLED` | `flux-log-enabled`|
|
||||
|
||||
###### influxd flag
|
||||
```sh
|
||||
influxd --flux-log-enabled=true
|
||||
```
|
||||
|
||||
###### Environment variable
|
||||
```sh
|
||||
export INFLUXD_FLUX_LOG_ENABLED=true
|
||||
```
|
||||
|
||||
###### Configuration file
|
||||
{{< code-tabs-wrapper >}}
|
||||
{{% code-tabs %}}
|
||||
[YAML](#)
|
||||
[TOML](#)
|
||||
[JSON](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
```yml
|
||||
flux-log-enabled: true
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
```toml
|
||||
flux-log-enabled = "true"
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
```json
|
||||
{
|
||||
"flux-log-enabled": "true"
|
||||
}
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{< /code-tabs-wrapper >}}
|
||||
|
||||
---
|
||||
|
||||
### http-bind-address
|
||||
Bind address for the InfluxDB HTTP API.
|
||||
Customize the URL and port for the InfluxDB API and UI.
|
||||
|
|
|
@ -8,6 +8,105 @@ menu:
|
|||
weight: 101
|
||||
---
|
||||
|
||||
## v2.0.9 [2021-09-27]
|
||||
|
||||
This release includes several new [features](#features) and [bug fixes](#bug-fixes).
|
||||
|
||||
### Features
|
||||
|
||||
New features include:
|
||||
|
||||
- [API updates](#api-updates)
|
||||
- [Flux updates](#flux-updates)
|
||||
- [Performance enhancements](#performance-enhancements)
|
||||
|
||||
#### API updates
|
||||
|
||||
- Add a new route `/api/v2/resources` that returns a list of known resources to the platform, including the following resource types. Makes it easier to update all-access tokens with current resources:
|
||||
|
||||
- `AuthorizationsResourceType`
|
||||
- `BucketsResourceType`
|
||||
- `ChecksResourceType`
|
||||
- `DashboardsResourceType`
|
||||
- `DBRPResourceType`
|
||||
- `DocumentsResourceType`
|
||||
- `LabelsResourceType`
|
||||
- `NotificationEndpointResourceType`
|
||||
- `NotificationRuleResourceType`
|
||||
- `OrgsResourceType`
|
||||
- `ScraperResourceType`
|
||||
- `SecretsResourceType`
|
||||
- `SourcesResourceType`
|
||||
- `TasksResourceType`
|
||||
- `TelegrafsResourceType`
|
||||
- `UsersResourceType`
|
||||
- `VariablesResourceType`
|
||||
- `ViewsResourceType`
|
||||
|
||||
|
||||
#### Flux updates
|
||||
|
||||
- Update to [Flux v0.130.0](/flux/v0.x/release-notes/#v01300-2021-09-15).
|
||||
- Add support for [`influxdb.cardinality()`](/flux/v0.x/stdlib/influxdata/influxdb/cardinality/) function.
|
||||
- Operational improvements:
|
||||
- Add logging to Flux end-to-end tests (`TestFluxEndToEnd`) to help diagnose test failures.
|
||||
- Add `--flux-log-enabled` option to [`influxd`](/influxdb/v2.0/reference/config-options/) to show detailed logs for Flux queries.
|
||||
|
||||
#### Performance enhancements
|
||||
|
||||
- Optimize series iteration for queries that can be answered without inspecting TSM data.
|
||||
- Optimize queries with predicates that contain multiple measurements.
|
||||
|
||||
### Bug fixes
|
||||
|
||||
This release includes the following bug fixes and updates:
|
||||
|
||||
- [API fix](#api-fix)
|
||||
- [Dependency update](#dependency-update)
|
||||
- [Error updates](#error-updates)
|
||||
- [Limit update](#limit-update)
|
||||
- [Miscellaneous operational fixes](#miscellaneous-operational-fixes)
|
||||
- [Task updates](#task-updates)
|
||||
- [Version maintenance](#version-maintenance)
|
||||
|
||||
#### API fix
|
||||
|
||||
- Correctly filter requests to `/api/v2/authorizations` by `org` and `user` parameters.
|
||||
|
||||
#### Dependency update
|
||||
|
||||
- Include `curl` as a dependency in `influxdb2` packages.
|
||||
|
||||
#### Errors updates
|
||||
|
||||
- Add message to set the Flux `content-type` when a query fails to parse as JSON.
|
||||
- Discard excessive errors over `DefaultMaxSavedErrors (100)` to prevent out-of-memory crashes.
|
||||
- Upgrade `golang.org/x/sys` to avoid panics on macs.
|
||||
|
||||
#### Limit update
|
||||
|
||||
- Implement hard limit on field size (`MaxFieldValueLength = 1048576`) while parsing line protocol.
|
||||
|
||||
#### Miscellaneous operational fixes
|
||||
|
||||
- Resolve the compaction queue stats flutter.
|
||||
- Ensure the TSI index compacts log files that meet one of the following criteria:
|
||||
- Log file hasn't been updated (no new series have been added to the shard) for 4 (or more) hours (to change this duration, specify a new [`storage-compact-full-write-cold-duration`](/influxdb/v2.0/reference/config-options/#storage-compact-full-write-cold-duration))
|
||||
- Log file is one (or more) megabytes (to update this size, specify a new [`storage-max-index-log-file-size`](/influxdb/v2.0/reference/config-options/#storage-max-index-log-file-size))
|
||||
- Repair bad port dropping return value names.
|
||||
- Use consistent path separator in permission string representation.
|
||||
- (Windows only) Copy snapshot files being backed up.
|
||||
|
||||
#### Task updates
|
||||
|
||||
- Updating an inactive task no longer schedules it. Thanks @raffs!
|
||||
- Preserve comments in Flux queries when saving task definitions.
|
||||
|
||||
#### Version maintenance
|
||||
|
||||
- Fix `X-Influxdb-Build` and `X-Influxdb-Version` response header at `/ping`.
|
||||
- Upgrade `influxql` to latest version and fix predicate handling for `SHOW TAG VALUES` meta queries.
|
||||
|
||||
## v2.0.8 [2021-08-13]
|
||||
|
||||
{{% warn %}} #### Upcoming changes to influx CLI packaging
|
||||
|
@ -134,9 +233,8 @@ The prefix used for Prometheus metrics from the query controller has changed fro
|
|||
- [http-write-timeout](/influxdb/v2.0/reference/config-options/#http-write-timeout)
|
||||
- [http-idle-timeout](/influxdb/v2.0/reference/config-options/#http-idle-timeout)
|
||||
- Add `/debug/pprof/all` HTTP endpoint to gather all profiles at once.
|
||||
- Include the InfluxDB 1.x `http.pprof-enabled` configuration option in the 2.0
|
||||
configuration file generated by the [InfluxDB upgrade process](/influxdb/v2.0/upgrade/v1-to-v2/automatic-upgrade/).
|
||||
- Add support for [custom shard group durations](/influxdb/v2.0/reference/cli/influx/bucket/create/#create-a-bucket-with-a-custom-shard-group-duration) on buckets.
|
||||
- Include the InfluxDB 1.x `http.pprof-enabled` configuration option in the 2.0 configuration file generated by the [InfluxDB upgrade process](/influxdb/v2.0/upgrade/v1-to-v2/automatic-upgrade/).
|
||||
- Add support for [custom shard group durations](/influxdb/v2.0/reference/cli/influx/bucket/create#create-a-bucket-with-a-custom-shard-group-duration) on buckets.
|
||||
- Optimize regular expression conditions in InfluxQL subqueries.
|
||||
- Update Telegraf plugins in the InfluxDB UI to include additions and changes from
|
||||
[Telegraf 1.18](/telegraf/v1.18/about_the_project/release-notes-changelog/#v118-2021-3-17).
|
||||
|
@ -260,7 +358,6 @@ The startup process automatically generates replacement `tsi1` indexes for shard
|
|||
- Support creating users without initial passwords in `influx user create`.
|
||||
- Fix incorrect errors when passing `--bucket-id` to `influx write`.
|
||||
|
||||
|
||||
## v2.0.3 General Availability [2020-12-14]
|
||||
|
||||
### Breaking Changes
|
||||
|
|
|
@ -3,7 +3,7 @@ title: Supported releases
|
|||
description: >
|
||||
Supported releases made to InfluxData.
|
||||
menu:
|
||||
influxdb_2_0:
|
||||
influxdb_2_0_ref:
|
||||
name: Supported releases
|
||||
parent: Release notes
|
||||
weight: 204
|
||||
|
|
Loading…
Reference in New Issue