Skip to content

Commit 3db8d19

Browse files
committed
ruler: add ability to remote_write directly
Add ability to use remote_write directly. This makes the component more general and makes it possible to use it with Thanos. Signed-off-by: Giedrius Statkevičius <[email protected]>
1 parent c119f36 commit 3db8d19

File tree

747 files changed

+194113
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

747 files changed

+194113
-54
lines changed

docs/configuration/config-file-reference.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5027,12 +5027,19 @@ The `ruler_config` configures the Cortex ruler.
50275027
# CLI flag: -ruler.frontend-address
50285028
[frontend_address: <string> | default = ""]
50295029
5030+
# Labels to ignore when restoring alert's state. This is only used if you are
5031+
# using the frontend address with some external system like Thanos.
5032+
[restore_ignore_labels: <list of string> | default = []]
5033+
50305034
# [Experimental] Query response format to get query results from Query Frontend
50315035
# when the rule evaluation. It will only take effect when
50325036
# `-ruler.frontend-address` is configured. Supported values: json,protobuf
50335037
# CLI flag: -ruler.query-response-format
50345038
[query_response_format: <string> | default = "protobuf"]
50355039

5040+
# What extra headers to send when evaluating rules.
5041+
[frontend_extra_params: <map of string to string> | default = ]
5042+
50365043
frontend_client:
50375044
# gRPC client max receive message size (bytes).
50385045
# CLI flag: -ruler.frontendClient.grpc-max-recv-msg-size
@@ -5113,6 +5120,9 @@ frontend_client:
51135120
# Labels to add to all alerts.
51145121
[external_labels: <map of string (labelName) to string (labelValue)> | default = []]
51155122

5123+
# Labels to drop from all alerts.
5124+
[drop_labels: <list of string> | default = []]
5125+
51165126
ruler_client:
51175127
# gRPC client max receive message size (bytes).
51185128
# CLI flag: -ruler.client.grpc-max-recv-msg-size
@@ -5202,6 +5212,13 @@ ruler_client:
52025212
# CLI flag: -ruler.rule-path
52035213
[rule_path: <string> | default = "/rules"]
52045214

5215+
remote_write:
5216+
# Where to remote write samples.
5217+
[url: <string> | default = ""]
5218+
5219+
# Extra headers to set when writing through remote_write.
5220+
[headers: <map of string to string> | default = ]
5221+
52055222
# Comma-separated list of URL(s) of the Alertmanager(s) to send notifications
52065223
# to. Each Alertmanager URL is treated as a separate group in the configuration.
52075224
# Multiple Alertmanagers in HA per group can be supported by using DNS

go.mod

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ require (
8484
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
8585
github.com/oklog/ulid/v2 v2.1.1
8686
github.com/parquet-go/parquet-go v0.25.1
87+
github.com/projectdiscovery/retryablehttp-go v1.0.119
8788
github.com/prometheus-community/parquet-common v0.0.0-20250801093248-94ad2ac56fa4
8889
github.com/prometheus/procfs v0.16.1
8990
github.com/sercand/kuberesolver/v5 v5.1.1
@@ -110,6 +111,9 @@ require (
110111
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 // indirect
111112
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50.0 // indirect
112113
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.52.0 // indirect
114+
github.com/Mzack9999/gcache v0.0.0-20230410081825-519e28eab057 // indirect
115+
github.com/Mzack9999/go-http-digest-auth-client v0.6.1-0.20220414142836-eb8883508809 // indirect
116+
github.com/akrylysov/pogreb v0.10.1 // indirect
113117
github.com/alecthomas/kingpin/v2 v2.4.0 // indirect
114118
github.com/andybalholm/brotli v1.1.1 // indirect
115119
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
@@ -126,11 +130,13 @@ require (
126130
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect
127131
github.com/aws/aws-sdk-go-v2/service/sts v1.33.20 // indirect
128132
github.com/aws/smithy-go v1.22.3 // indirect
133+
github.com/aymerick/douceur v0.2.0 // indirect
129134
github.com/beorn7/perks v1.0.1 // indirect
130135
github.com/blang/semver/v4 v4.0.0 // indirect
131136
github.com/caio/go-tdigest v3.1.0+incompatible // indirect
132137
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
133138
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
139+
github.com/cloudflare/circl v1.6.1 // indirect
134140
github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect
135141
github.com/coder/quartz v0.1.2 // indirect
136142
github.com/coreos/go-semver v0.3.0 // indirect
@@ -140,6 +146,7 @@ require (
140146
github.com/dennwc/varint v1.0.0 // indirect
141147
github.com/dgryski/go-metro v0.0.0-20250106013310-edb8663e5e33 // indirect
142148
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
149+
github.com/dimchansky/utfbom v1.1.1 // indirect
143150
github.com/docker/go-units v0.5.0 // indirect
144151
github.com/edsrzf/mmap-go v1.2.0 // indirect
145152
github.com/efficientgo/tools/extkingpin v0.0.0-20230505153745-6b7392939a60 // indirect
@@ -148,6 +155,7 @@ require (
148155
github.com/fatih/color v1.18.0 // indirect
149156
github.com/felixge/httpsnoop v1.0.4 // indirect
150157
github.com/fsnotify/fsnotify v1.9.0 // indirect
158+
github.com/gaissmai/bart v0.20.5 // indirect
151159
github.com/go-chi/chi/v5 v5.0.7 // indirect
152160
github.com/go-ini/ini v1.67.0 // indirect
153161
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
@@ -174,6 +182,7 @@ require (
174182
github.com/google/s2a-go v0.1.9 // indirect
175183
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
176184
github.com/googleapis/gax-go/v2 v2.14.2 // indirect
185+
github.com/gorilla/css v1.0.1 // indirect
177186
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 // indirect
178187
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
179188
github.com/hashicorp/errwrap v1.1.0 // indirect
@@ -204,6 +213,7 @@ require (
204213
github.com/mdlayher/socket v0.5.1 // indirect
205214
github.com/mdlayher/vsock v1.2.1 // indirect
206215
github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a // indirect
216+
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
207217
github.com/miekg/dns v1.1.66 // indirect
208218
github.com/minio/crc64nvme v1.0.1 // indirect
209219
github.com/minio/md5-simd v1.1.2 // indirect
@@ -225,15 +235,23 @@ require (
225235
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
226236
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
227237
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
238+
github.com/projectdiscovery/blackrock v0.0.1 // indirect
239+
github.com/projectdiscovery/fastdialer v0.4.2 // indirect
240+
github.com/projectdiscovery/hmap v0.0.91 // indirect
241+
github.com/projectdiscovery/networkpolicy v0.1.18 // indirect
242+
github.com/projectdiscovery/retryabledns v1.0.104 // indirect
243+
github.com/projectdiscovery/utils v0.4.22 // indirect
228244
github.com/prometheus-community/prom-label-proxy v0.11.1 // indirect
229245
github.com/prometheus/exporter-toolkit v0.14.0 // indirect
230246
github.com/prometheus/otlptranslator v0.0.0-20250620074007-94f535e0c588 // indirect
231247
github.com/prometheus/sigv4 v0.2.0 // indirect
232248
github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect
233249
github.com/rantav/go-grpc-channelz v0.0.4 // indirect
234250
github.com/redis/rueidis v1.0.61 // indirect
251+
github.com/refraction-networking/utls v1.7.1 // indirect
235252
github.com/rs/cors v1.11.1 // indirect
236253
github.com/rs/xid v1.6.0 // indirect
254+
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect
237255
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
238256
github.com/seiflotfy/cuckoofilter v0.0.0-20240715131351-a2f2c23f1771 // indirect
239257
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect
@@ -242,14 +260,27 @@ require (
242260
github.com/soheilhy/cmux v0.1.5 // indirect
243261
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
244262
github.com/stretchr/objx v0.5.2 // indirect
263+
github.com/syndtr/goleveldb v1.0.0 // indirect
264+
github.com/tidwall/btree v1.4.3 // indirect
265+
github.com/tidwall/buntdb v1.3.0 // indirect
266+
github.com/tidwall/gjson v1.18.0 // indirect
267+
github.com/tidwall/grect v0.1.4 // indirect
268+
github.com/tidwall/match v1.1.1 // indirect
269+
github.com/tidwall/pretty v1.2.1 // indirect
270+
github.com/tidwall/rtred v0.1.2 // indirect
271+
github.com/tidwall/tinyqueue v0.1.1 // indirect
245272
github.com/tinylib/msgp v1.3.0 // indirect
246273
github.com/trivago/tgo v1.0.7 // indirect
247274
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
248275
github.com/vimeo/galaxycache v1.3.1 // indirect
249276
github.com/weaveworks/promrus v1.2.0 // indirect
277+
github.com/weppos/publicsuffix-go v0.40.3-0.20250408071509-6074bbe7fd39 // indirect
250278
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
251279
github.com/yuin/gopher-lua v1.1.1 // indirect
252280
github.com/zeebo/errs v1.4.0 // indirect
281+
github.com/zmap/rc2 v0.0.0-20190804163417-abaa70531248 // indirect
282+
github.com/zmap/zcrypto v0.0.0-20230422215203-9a665e1e9968 // indirect
283+
go.etcd.io/bbolt v1.3.7 // indirect
253284
go.mongodb.org/mongo-driver v1.17.4 // indirect
254285
go.opencensus.io v0.24.0 // indirect
255286
go.opentelemetry.io/auto/sdk v1.1.0 // indirect

0 commit comments

Comments
 (0)