Title here
Summary here
The ThanosQuery CRD manages the Thanos Querier which provides a global PromQL query view across all types of Thanos data sources through the StoreAPI. It automatically discovers and connects to Store API endpoints and optionally can deploy a Query Frontend for improved query response times.
ThanosQuery consists of two main components:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Grafana │ │ Perses │ │ Other Clients │
│ │ │ │ │ │
└─────────┬───────┘ └─────────┬───────┘ └─────────┬───────┘
│ │ │
└──────────────────────┼──────────────────────┘
│ PromQL Queries
▼
┌─────────────────────┐
│ Thanos Query │
│ Frontend │
│ (Optional) │
└─────────┬───────────┘
│
▼
┌─────────────────────┐
│ Thanos Query │
│ │
└─────────┬───────────┘
│
┌───────────────┼───────────────┐
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ ThanosStore │ │ ThanosReceive │ │ Prometheus │
│ (Historical) │ │ (Recent) │ │ Sidecar │
└─────────────────┘ └─────────────────┘ └─────────────────┘
apiVersion: monitoring.thanos.io/v1alpha1
kind: ThanosQuery
metadata:
name: example-query
spec:
customStoreLabelSelector:
matchLabels:
operator.thanos.io/store-api: "true"
imagePullPolicy: IfNotPresent
labels:
some-label: xyz
logFormat: logfmt
replicaLabels:
- prometheus_replica
- replica
- rule_replica
queryFrontend:
compressResponses: true
imagePullPolicy: IfNotPresent
labelsMaxRetries: 3
logFormat: logfmt
logQueriesLongerThan: 10s
queryLabelSelector:
matchLabels:
operator.thanos.io/query-api: "true"
queryRangeMaxRetries: 3
replicas: 2
replicas: 1Found a typo, inconsistency or missing information in our docs? Help us to improve Thanos Operator documentation by proposing a fix on GitHub here ❤️