thanos-receive
Thanos Receive - accepts remote write from Prometheus for multi-tenant ingestion
About this chart
Thanos Receive Helm Chart
This chart deploys Thanos Receive on Kubernetes.
Thanos Receive accepts Prometheus remote write requests and stores data in object storage. It supports multi-tenancy and horizontal scaling via hashring.
Prerequisites
- Kubernetes 1.19+
- Helm 3.2+
- Object storage (S3, GCS, Azure Blob, etc.)
Installation
helm repo add scripton-charts https://scriptonbasestar-container.github.io/sb-helm-charts
helm install thanos-receive scripton-charts/thanos-receive
Configuration
Object Storage
Configure object storage in values.yaml:
objstore:
type: "s3"
s3:
endpoint: "minio.minio.svc.cluster.local:9000"
bucket: "thanos"
accessKey: "minio"
secretKey: "minio123"
insecure: true
Or use an existing secret:
objstore:
existingSecret: "thanos-objstore-secret"
Multi-Tenancy
Enable multi-tenancy:
thanos:
tenancy:
enabled: true
header: "THANOS-TENANT"
defaultTenant: "default-tenant"
Hashring Configuration
The chart automatically generates hashring configuration based on replicaCount. Adjust replication factor:
replicaCount: 3
thanos:
receive:
replicationFactor: 2
tsdbRetention: "2h"
Prometheus Remote Write
Configure Prometheus to send metrics:
prometheus:
remoteWrite:
- url: http://thanos-receive.monitoring.svc.cluster.local:10908/api/v1/receive
For multi-tenant setups:
prometheus:
remoteWrite:
- url: http://thanos-receive.monitoring.svc.cluster.local:10908/api/v1/receive
headers:
THANOS-TENANT: my-tenant-id
Ports
| Port | Protocol | Description |
|---|---|---|
| 10901 | gRPC | Store API for Thanos Query |
| 10902 | HTTP | Metrics and status endpoints |
| 10908 | HTTP | Remote write receiver |
Integration with Thanos Query
Add Receive to Thanos Query stores:
thanos:
stores:
- dnssrv+_grpc._tcp.thanos-receive-headless.monitoring.svc.cluster.local
Parameters
Common Parameters
| Parameter | Description | Default |
|---|---|---|
replicaCount | Number of Receive replicas | 3 |
image.repository | Image repository | quay.io/thanos/thanos |
image.tag | Image tag | "" (uses appVersion) |
Thanos Parameters
| Parameter | Description | Default |
|---|---|---|
thanos.receive.replicationFactor | Replication factor | 1 |
thanos.receive.tsdbRetention | TSDB retention before upload | "2h" |
thanos.tenancy.enabled | Enable multi-tenancy | false |
thanos.tenancy.header | Tenant header name | "THANOS-TENANT" |
thanos.labels | Labels to add to metrics | {} |
Service Parameters
| Parameter | Description | Default |
|---|---|---|
service.type | Service type | ClusterIP |
service.httpPort | HTTP port | 10909 |
service.grpcPort | gRPC port | 10907 |
service.remoteWritePort | Remote write port | 10908 |
Persistence Parameters
| Parameter | Description | Default |
|---|---|---|
persistence.enabled | Enable persistence | true |
persistence.size | PVC size | 50Gi |
persistence.storageClass | Storage class | "" |
License
BSD-3-Clause
Deploy thanos-receive with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has thanos-receive on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartthanos-receive is pinned at v0.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply