-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
- Loading branch information
Showing
4 changed files
with
135 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
--- | ||
title: Receiver | ||
type: docs | ||
menu: components | ||
--- | ||
|
||
# Receiver | ||
|
||
The `thanos receive` command implements the [Prometheus Remote Write API](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write). It builds on top of existing Prometheus servers and retains their usefulness while extending their functionality with long-term-storage, horizontal scalability, and downsampling. The [Thanos Sidecar](./sidecar.md) is not sufficient for this, as the system would always lag the block length behind (typically 2 hours), which would prevent the most common query pattern of Prometheus: real-time queries of very recent data. | ||
|
||
This component is only recommended for uses for whom pushing is the only viable solution, for example, analytics use cases or cases where the data ingestion must be client-initiated, such as software as a service type environments. | ||
|
||
This component is not recommended in order to achieve a global view of data of a single-tenant, for those cases the sidecar based approach with layered Thanos Queriers is recommended. Multi-tenancy may also be achievable if ingestion is not user-controlled, as then enforcing of labels, for example using the [prom-label-proxy](https://github.com/openshift/prom-label-proxy) (please thoroughly understand the mechanism if intending to employ this mechanism, as the wrong configuration could leak data). | ||
|
||
Also, users are asked to note the [various pros and cons of pushing metrics](https://docs.google.com/document/d/1H47v7WfyKkSLMrR8_iku6u9VB73WrVzBHb2SB6dL9_g/edit#heading=h.2v27snv0lsur). | ||
|
||
For more information please check out [initial design proposal](../proposals/201812_thanos-remote-receive.md). | ||
For further information on tuning Prometheus Remote Write [see remote write tuning document](https://prometheus.io/docs/practices/remote_write/). | ||
|
||
## Flags | ||
|
||
[embedmd]:# (flags/receive.txt $) | ||
```$ | ||
usage: thanos receive [<flags>] | ||
Accept Prometheus remote write API requests and write to local tsdb | ||
(EXPERIMENTAL, this may change drastically without notice) | ||
Flags: | ||
-h, --help Show context-sensitive help (also try | ||
--help-long and --help-man). | ||
--version Show application version. | ||
--log.level=info Log filtering level. | ||
--log.format=logfmt Log format to use. Possible options: logfmt or | ||
json. | ||
--tracing.config-file=<file-path> | ||
Path to YAML file with tracing configuration. | ||
See format details: | ||
https://thanos.io/tracing.md/#configuration | ||
--tracing.config=<content> | ||
Alternative to 'tracing.config-file' flag | ||
(lower priority). Content of YAML file with | ||
tracing configuration. See format details: | ||
https://thanos.io/tracing.md/#configuration | ||
--http-address="0.0.0.0:10902" | ||
Listen host:port for HTTP endpoints. | ||
--http-grace-period=2m Time to wait after an interrupt received for | ||
HTTP Server. | ||
--grpc-address="0.0.0.0:10901" | ||
Listen ip:port address for gRPC endpoints | ||
(StoreAPI). Make sure this address is routable | ||
from other components. | ||
--grpc-grace-period=2m Time to wait after an interrupt received for | ||
GRPC Server. | ||
--grpc-server-tls-cert="" TLS Certificate for gRPC server, leave blank to | ||
disable TLS | ||
--grpc-server-tls-key="" TLS Key for the gRPC server, leave blank to | ||
disable TLS | ||
--grpc-server-tls-client-ca="" | ||
TLS CA to verify clients against. If no client | ||
CA is specified, there is no client | ||
verification on server side. (tls.NoClientCert) | ||
--remote-write.address="0.0.0.0:19291" | ||
Address to listen on for remote write requests. | ||
--remote-write.server-tls-cert="" | ||
TLS Certificate for HTTP server, leave blank to | ||
disable TLS | ||
--remote-write.server-tls-key="" | ||
TLS Key for the HTTP server, leave blank to | ||
disable TLS | ||
--remote-write.server-tls-client-ca="" | ||
TLS CA to verify clients against. If no client | ||
CA is specified, there is no client | ||
verification on server side. (tls.NoClientCert) | ||
--remote-write.client-tls-cert="" | ||
TLS Certificates to use to identify this client | ||
to the server | ||
--remote-write.client-tls-key="" | ||
TLS Key for the client's certificate | ||
--remote-write.client-tls-ca="" | ||
TLS CA Certificates to use to verify servers | ||
--remote-write.client-server-name="" | ||
Server name to verify the hostname on the | ||
returned gRPC certificates. See | ||
https://tools.ietf.org/html/rfc4366#section-3.1 | ||
--tsdb.path="./data" Data directory of TSDB. | ||
--label=key="value" ... External labels to announce. This flag will be | ||
removed in the future when handling multiple | ||
tsdb instances is added. | ||
--objstore.config-file=<file-path> | ||
Path to YAML file that contains object store | ||
configuration. See format details: | ||
https://thanos.io/storage.md/#configuration | ||
--objstore.config=<content> | ||
Alternative to 'objstore.config-file' flag | ||
(lower priority). Content of YAML file that | ||
contains object store configuration. See format | ||
details: | ||
https://thanos.io/storage.md/#configuration | ||
--tsdb.retention=15d How long to retain raw samples on local | ||
storage. 0d - disables this retention | ||
--receive.hashrings-file=<path> | ||
Path to file that contains the hashring | ||
configuration. | ||
--receive.hashrings-file-refresh-interval=5m | ||
Refresh interval to re-read the hashring | ||
configuration file. (used as a fallback) | ||
--receive.local-endpoint=RECEIVE.LOCAL-ENDPOINT | ||
Endpoint of local receive node. Used to | ||
identify the local node in the hashring | ||
configuration. | ||
--receive.tenant-header="THANOS-TENANT" | ||
HTTP header to determine tenant for write | ||
requests. | ||
--receive.default-tenant-id="default-tenant" | ||
Default tenant ID to use when none is provided | ||
via a header. | ||
--receive.tenant-label-name="tenant_id" | ||
Label name through which the tenant will be | ||
announced. | ||
--receive.replica-header="THANOS-REPLICA" | ||
HTTP header specifying the replica number of a | ||
write request. | ||
--receive.replication-factor=1 | ||
How many times to replicate incoming write | ||
requests. | ||
--tsdb.wal-compression Compress the tsdb WAL. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters