Skip to content
61 changes: 61 additions & 0 deletions docs/api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ For the sake of clarity, in this document we have grouped API endpoints by servi
| [Delete Alertmanager configuration](#delete-alertmanager-configuration) | Alertmanager || `DELETE /api/v1/alerts` |
| [Tenant delete request](#tenant-delete-request) | Purger || `POST /purger/delete_tenant` |
| [Tenant delete status](#tenant-delete-status) | Purger || `GET /purger/delete_tenant_status` |
| [Get user overrides](#get-user-overrides) | Overrides || `GET /api/v1/user-overrides` |
| [Set user overrides](#set-user-overrides) | Overrides || `PUT /api/v1/user-overrides` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| [Set user overrides](#set-user-overrides) | Overrides || `PUT /api/v1/user-overrides` |
| [Set user overrides](#set-user-overrides) | Overrides || `POST /api/v1/user-overrides` |

| [Delete user overrides](#delete-user-overrides) | Overrides || `DELETE /api/v1/user-overrides` |
| [Store-gateway ring status](#store-gateway-ring-status) | Store-gateway || `GET /store-gateway/ring` |
| [Compactor ring status](#compactor-ring-status) | Compactor || `GET /compactor/ring` |
| [Get rule files](#get-rule-files) | Configs API (deprecated) || `GET /api/prom/configs/rules` |
Expand Down Expand Up @@ -872,6 +875,64 @@ Returns status of tenant deletion. Output format to be defined. Experimental.

_Requires [authentication](#authentication)._

## Overrides

The Overrides service provides an API for managing user overrides.

### Get user overrides

```
GET /api/v1/user-overrides
```

Get the current overrides for the authenticated tenant. Returns the overrides in JSON format.

_Requires [authentication](#authentication)._

### Set user overrides

```
PUT /api/v1/user-overrides
```

Set or update overrides for the authenticated tenant. The request body should contain a JSON object with the override values.

_Requires [authentication](#authentication)._

### Delete user overrides

```
DELETE /api/v1/user-overrides
```

Delete all overrides for the authenticated tenant. This will revert the tenant to using default values.

_Requires [authentication](#authentication)._

#### Example request body for PUT

```json
{
"ingestion_rate": 50000,
"max_global_series_per_user": 1000000,
"ruler_max_rules_per_rule_group": 100
}
```

#### Supported limits

The following limits can be modified via the API:
- `max_global_series_per_user`
- `max_global_series_per_metric`
- `ingestion_rate`
- `ingestion_burst_size`
- `ruler_max_rules_per_rule_group`
- `ruler_max_rule_groups_per_tenant`

#### Hard limits

Overrides are validated against hard limits defined in the runtime configuration file. If a requested override exceeds the hard limit for the tenant, the request will be rejected with a 400 status code.

## Store-gateway

### Store-gateway ring status
Expand Down
291 changes: 291 additions & 0 deletions docs/configuration/config-file-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,296 @@ query_scheduler:
# CLI flag: -query-scheduler.grpc-client-config.connect-timeout
[connect_timeout: <duration> | default = 5s]

overrides:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You added a new target "overrides", that's good. No need to add new flags. Use the flags available: https://cortexmetrics.io/docs/configuration/configuration-file/#runtime_configuration_storage_config

# Path to the runtime configuration file that can be updated via the overrides
# API
# CLI flag: -overrides.runtime-config-file
[runtime_config_file: <string> | default = "runtime.yaml"]

# Backend storage to use. Supported backends are: s3, gcs, azure, swift,
# filesystem.
# CLI flag: -overrides.backend
[backend: <string> | default = "s3"]

s3:
# The S3 bucket endpoint. It could be an AWS S3 endpoint listed at
# https://docs.aws.amazon.com/general/latest/gr/s3.html or the address of an
# S3-compatible service in hostname:port format.
# CLI flag: -overrides.s3.endpoint
[endpoint: <string> | default = ""]

# S3 region. If unset, the client will issue a S3 GetBucketLocation API call
# to autodetect it.
# CLI flag: -overrides.s3.region
[region: <string> | default = ""]

# S3 bucket name
# CLI flag: -overrides.s3.bucket-name
[bucket_name: <string> | default = ""]

# If enabled, S3 endpoint will use the non-dualstack variant.
# CLI flag: -overrides.s3.disable-dualstack
[disable_dualstack: <boolean> | default = false]

# S3 secret access key
# CLI flag: -overrides.s3.secret-access-key
[secret_access_key: <string> | default = ""]

# S3 access key ID
# CLI flag: -overrides.s3.access-key-id
[access_key_id: <string> | default = ""]

# If enabled, use http:// for the S3 endpoint instead of https://. This
# could be useful in local dev/test environments while using an
# S3-compatible backend storage, like Minio.
# CLI flag: -overrides.s3.insecure
[insecure: <boolean> | default = false]

# The signature version to use for authenticating against S3. Supported
# values are: v4, v2.
# CLI flag: -overrides.s3.signature-version
[signature_version: <string> | default = "v4"]

# The s3 bucket lookup style. Supported values are: auto, virtual-hosted,
# path.
# CLI flag: -overrides.s3.bucket-lookup-type
[bucket_lookup_type: <string> | default = "auto"]

# If true, attach MD5 checksum when upload objects and S3 uses MD5 checksum
# algorithm to verify the provided digest. If false, use CRC32C algorithm
# instead.
# CLI flag: -overrides.s3.send-content-md5
[send_content_md5: <boolean> | default = true]

# The list api version. Supported values are: v1, v2, and ''.
# CLI flag: -overrides.s3.list-objects-version
[list_objects_version: <string> | default = ""]

# The s3_sse_config configures the S3 server-side encryption.
# The CLI flags prefix for this block config is: overrides
[sse: <s3_sse_config>]

http:
# The time an idle connection will remain idle before closing.
# CLI flag: -overrides.s3.http.idle-conn-timeout
[idle_conn_timeout: <duration> | default = 1m30s]

# The amount of time the client will wait for a servers response headers.
# CLI flag: -overrides.s3.http.response-header-timeout
[response_header_timeout: <duration> | default = 2m]

# If the client connects via HTTPS and this option is enabled, the client
# will accept any certificate and hostname.
# CLI flag: -overrides.s3.http.insecure-skip-verify
[insecure_skip_verify: <boolean> | default = false]

# Maximum time to wait for a TLS handshake. 0 means no limit.
# CLI flag: -overrides.s3.tls-handshake-timeout
[tls_handshake_timeout: <duration> | default = 10s]

# The time to wait for a server's first response headers after fully
# writing the request headers if the request has an Expect header. 0 to
# send the request body immediately.
# CLI flag: -overrides.s3.expect-continue-timeout
[expect_continue_timeout: <duration> | default = 1s]

# Maximum number of idle (keep-alive) connections across all hosts. 0
# means no limit.
# CLI flag: -overrides.s3.max-idle-connections
[max_idle_connections: <int> | default = 100]

# Maximum number of idle (keep-alive) connections to keep per-host. If 0,
# a built-in default value is used.
# CLI flag: -overrides.s3.max-idle-connections-per-host
[max_idle_connections_per_host: <int> | default = 100]

# Maximum number of connections per host. 0 means no limit.
# CLI flag: -overrides.s3.max-connections-per-host
[max_connections_per_host: <int> | default = 0]

gcs:
# GCS bucket name
# CLI flag: -overrides.gcs.bucket-name
[bucket_name: <string> | default = ""]

# JSON representing either a Google Developers Console
# client_credentials.json file or a Google Developers service account key
# file. If empty, fallback to Google default logic.
# CLI flag: -overrides.gcs.service-account
[service_account: <string> | default = ""]

azure:
# Azure storage account name
# CLI flag: -overrides.azure.account-name
[account_name: <string> | default = ""]

# Azure storage account key
# CLI flag: -overrides.azure.account-key
[account_key: <string> | default = ""]

# The values of `account-name` and `endpoint-suffix` values will not be
# ignored if `connection-string` is set. Use this method over `account-key`
# if you need to authenticate via a SAS token or if you use the Azurite
# emulator.
# CLI flag: -overrides.azure.connection-string
[connection_string: <string> | default = ""]

# Azure storage container name
# CLI flag: -overrides.azure.container-name
[container_name: <string> | default = ""]

# Azure storage endpoint suffix without schema. The account name will be
# prefixed to this value to create the FQDN
# CLI flag: -overrides.azure.endpoint-suffix
[endpoint_suffix: <string> | default = ""]

# Number of retries for recoverable errors
# CLI flag: -overrides.azure.max-retries
[max_retries: <int> | default = 20]

# Deprecated: Azure storage MSI resource. It will be set automatically by
# Azure SDK.
# CLI flag: -overrides.azure.msi-resource
[msi_resource: <string> | default = ""]

# Azure storage MSI resource managed identity client Id. If not supplied
# default Azure credential will be used. Set it to empty if you need to
# authenticate via Azure Workload Identity.
# CLI flag: -overrides.azure.user-assigned-id
[user_assigned_id: <string> | default = ""]

http:
# The time an idle connection will remain idle before closing.
# CLI flag: -overrides.azure.http.idle-conn-timeout
[idle_conn_timeout: <duration> | default = 1m30s]

# The amount of time the client will wait for a servers response headers.
# CLI flag: -overrides.azure.http.response-header-timeout
[response_header_timeout: <duration> | default = 2m]

# If the client connects via HTTPS and this option is enabled, the client
# will accept any certificate and hostname.
# CLI flag: -overrides.azure.http.insecure-skip-verify
[insecure_skip_verify: <boolean> | default = false]

# Maximum time to wait for a TLS handshake. 0 means no limit.
# CLI flag: -overrides.azure.tls-handshake-timeout
[tls_handshake_timeout: <duration> | default = 10s]

# The time to wait for a server's first response headers after fully
# writing the request headers if the request has an Expect header. 0 to
# send the request body immediately.
# CLI flag: -overrides.azure.expect-continue-timeout
[expect_continue_timeout: <duration> | default = 1s]

# Maximum number of idle (keep-alive) connections across all hosts. 0
# means no limit.
# CLI flag: -overrides.azure.max-idle-connections
[max_idle_connections: <int> | default = 100]

# Maximum number of idle (keep-alive) connections to keep per-host. If 0,
# a built-in default value is used.
# CLI flag: -overrides.azure.max-idle-connections-per-host
[max_idle_connections_per_host: <int> | default = 100]

# Maximum number of connections per host. 0 means no limit.
# CLI flag: -overrides.azure.max-connections-per-host
[max_connections_per_host: <int> | default = 0]

swift:
# OpenStack Swift authentication API version. 0 to autodetect.
# CLI flag: -overrides.swift.auth-version
[auth_version: <int> | default = 0]

# OpenStack Swift authentication URL
# CLI flag: -overrides.swift.auth-url
[auth_url: <string> | default = ""]

# OpenStack Swift application credential ID.
# CLI flag: -overrides.swift.application-credential-id
[application_credential_id: <string> | default = ""]

# OpenStack Swift application credential name.
# CLI flag: -overrides.swift.application-credential-name
[application_credential_name: <string> | default = ""]

# OpenStack Swift application credential secret.
# CLI flag: -overrides.swift.application-credential-secret
[application_credential_secret: <string> | default = ""]

# OpenStack Swift username.
# CLI flag: -overrides.swift.username
[username: <string> | default = ""]

# OpenStack Swift user's domain name.
# CLI flag: -overrides.swift.user-domain-name
[user_domain_name: <string> | default = ""]

# OpenStack Swift user's domain ID.
# CLI flag: -overrides.swift.user-domain-id
[user_domain_id: <string> | default = ""]

# OpenStack Swift user ID.
# CLI flag: -overrides.swift.user-id
[user_id: <string> | default = ""]

# OpenStack Swift API key.
# CLI flag: -overrides.swift.password
[password: <string> | default = ""]

# OpenStack Swift user's domain ID.
# CLI flag: -overrides.swift.domain-id
[domain_id: <string> | default = ""]

# OpenStack Swift user's domain name.
# CLI flag: -overrides.swift.domain-name
[domain_name: <string> | default = ""]

# OpenStack Swift project ID (v2,v3 auth only).
# CLI flag: -overrides.swift.project-id
[project_id: <string> | default = ""]

# OpenStack Swift project name (v2,v3 auth only).
# CLI flag: -overrides.swift.project-name
[project_name: <string> | default = ""]

# ID of the OpenStack Swift project's domain (v3 auth only), only needed if
# it differs the from user domain.
# CLI flag: -overrides.swift.project-domain-id
[project_domain_id: <string> | default = ""]

# Name of the OpenStack Swift project's domain (v3 auth only), only needed
# if it differs from the user domain.
# CLI flag: -overrides.swift.project-domain-name
[project_domain_name: <string> | default = ""]

# OpenStack Swift Region to use (v2,v3 auth only).
# CLI flag: -overrides.swift.region-name
[region_name: <string> | default = ""]

# Name of the OpenStack Swift container to put chunks in.
# CLI flag: -overrides.swift.container-name
[container_name: <string> | default = ""]

# Max retries on requests error.
# CLI flag: -overrides.swift.max-retries
[max_retries: <int> | default = 3]

# Time after which a connection attempt is aborted.
# CLI flag: -overrides.swift.connect-timeout
[connect_timeout: <duration> | default = 10s]

# Time after which an idle request is aborted. The timeout watchdog is reset
# each time some data is received, so the timeout triggers after X time no
# data is received on a request.
# CLI flag: -overrides.swift.request-timeout
[request_timeout: <duration> | default = 5s]

filesystem:
# Local filesystem storage directory.
# CLI flag: -overrides.filesystem.dir
[dir: <string> | default = ""]

# The tracing_config configures backends cortex uses.
[tracing: <tracing_config>]
```
Expand Down Expand Up @@ -6077,6 +6367,7 @@ The `s3_sse_config` configures the S3 server-side encryption. The supported CLI

- `alertmanager-storage`
- `blocks-storage`
- `overrides`
- `ruler-storage`
- `runtime-config`

Expand Down
Loading