Repository navigation
Expand file tree
/
Copy pathexample.full.yaml
More file actions
2359 lines (2183 loc) · 124 KB
/
Copy pathexample.full.yaml
File metadata and controls
2359 lines (2183 loc) · 124 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# Trickster 2.x Example Configuration File - Exhaustive
#
# To use this, run: trickster -config /path/to/example.full.yaml
#
# This file contains descriptions and examples for all
# Trickster configuration options. More documentation is
# available at https://github.com/trickstercache/trickster/docs/
#
# Optional configs are commented out, required configs are uncommented
# and set to common values that let you try it out with Prometheus
#
# Copyright 2018 The Trickster Authors
#
# main:
# # instance_id allows you to run multiple Trickster processes on the same host and log to separate files
# # Useful for baremetal, not so much for elastic deployments, so only uncomment if you really need it
# # default is 0, which means ignored
# instance_id: 0
# # server_name provides the name of this server instance, used to self-identfy in Via and other Forwarding headers
# # server_name defaults to os.Hostname() when left blank
# server_name: ''
# # config_include_directory overrides the default conf.d directory next to this file.
# # Relative paths are resolved from the directory containing the primary config file.
# # This option is valid only in the primary file, not in included files or directory mode.
# config_include_directory: ''
# Configuration options for inbound listeners.
# The legacy frontend section and listener ports under metrics and mgmt remain
# supported for compatibility, but are deprecated. A matching listeners entry
# takes precedence over those legacy values.
# # The default, metrics, and mgmt entries are built-in and can be customized here.
# listeners:
# # default is built-in and the default frontend for all defined backends
# default:
# # protocol defines the protocol used by the listener, and defaults to http
# protocol: http
# # port is the port the listener uses. default uses 8480 by default
# port: 8480
# # address is empty by default, meaning listen on all interfaces.
# address: ''
# # tls_port value of 0 means disabled. A value > 0 starts only when a
# # mapped backend provides a certificate and key. default uses 8483 by default
# tls_port: 8483
# # tls_address is empty by default, meaning listen on all interfaces.
# tls_address: ''
# # tls_watch_interval is the backstop poll for out-of-band cert/key
# # rotation (e.g. certbot). FS events accelerate detection where supported.
# # Changes are hot-swapped without restart. default 30s; 0 disables
# tls_watch_interval: 30s
# # tls_runtime_certs serves tls_port even when no mapped backend provides a
# # certificate file; certificates are then supplied to the running process
# # (e.g. by the Kubernetes controller from Secrets). default false
# tls_runtime_certs: false
# # connections_limit defines the maximum number of concurrent connections
# # the listener may handle at any time. 0 means unlimited
# connections_limit: 0
#
# # read_header_timeout defines the amount of time allowed to read request headers.
# read_header_timeout: 10s
#
# # read_timeout bounds the time allowed to read a whole request, body included.
# # 0 sets no bound. Default: 0
# read_timeout: 0s
#
# # idle_timeout closes a keep-alive connection that waits this long for its next
# # request. 0 keeps idle connections open indefinitely. Default: 2m
# idle_timeout: 2m
#
# # max_header_bytes caps the bytes read for a request's line and headers.
# # 0 selects the net/http default of 1 MB. Default: 0
# max_header_bytes: 0
#
# # trusted_proxies lists the addresses and CIDRs of proxies in front of this
# # listener. A connection from one of them is attributed to the client named
# # by its Forwarded, X-Forwarded-For or X-Real-IP header; any other connection
# # is attributed to its peer, whatever headers it carries. See docs/configuring.md
# trusted_proxies: [ 10.0.0.0/8 ]
#
# # proxy_protocol accepts a PROXY protocol v1/v2 header ahead of each connection,
# # honored from every peer when trusted_proxies is empty and only from a trusted
# # proxy otherwise. Default: false
# proxy_protocol: false
#
# # ip_acl_name applies a named ip_acls entry to every connection on this
# # listener, including mgmt and metrics. none is not valid here.
# # See docs/ip-acl.md
# ip_acl_name: office
#
# # path_normalization cleans each request path before routing it, and the
# # cleaned path is what the origin receives. See docs/configuring.md
# path_normalization:
# # dot_segments removes '.' and '..' segments per RFC 3986 (normalize),
# # refuses them with 400 (reject), or leaves them (off). Default: normalize
# dot_segments: normalize
# # merge_slashes collapses each run of slashes to one. Default: false
# merge_slashes: false
# # escaped_slashes forwards %2F as data within a segment (keep), refuses
# # it with 400 (reject), or decodes it to a separator (unescape). Default: keep
# escaped_slashes: keep
#
# # max_request_body_size_bytes indicates the maximum allowed request body size.
# # Use 0 for no body allowed, and < 0 for no maximum. Default: 10MB.
# max_request_body_size_bytes: 10485760
#
# # truncate_request_body_too_large truncates oversized bodies instead of returning 413.
# # Default: false.
# truncate_request_body_too_large: false
#
# # http3 serves this listener's routes over HTTP/3 (QUIC) in addition to
# # HTTP/1.1 and HTTP/2. Requires a working TLS endpoint, since QUIC has no
# # cleartext mode. Responses on the TLS/TCP endpoint advertise the HTTP/3
# # endpoint via Alt-Svc so clients upgrade on their own. See docs/http3.md
# http3:
# # enabled turns on the HTTP/3 endpoint. Default: false
# enabled: false
# # port is the UDP port to bind. Defaults to this listener's tls_port
# port: 8483
# # address is the IP for the UDP socket. Defaults to tls_address
# address: ''
# # advertised_port is the port published in Alt-Svc. Defaults to port.
# # Set it when a load balancer or NAT presents a different port to
# # clients than the one bound here
# advertised_port: 0
#
# # metrics:
# # 8481 is the default port for metrics
# # port: 8481
# # address: ''
# # mgmt:
# # 8484 is the default management port
# # port: 8484
# # address: ''
#
# # A listener with protocol mysql accepts MySQL wire-protocol connections
# # and requires exactly one backend with provider mysql mapped to it via
# # the backend's listener_names. TLS ports are not supported on mysql
# # listeners (MySQL negotiates TLS in-band on the same port).
# mysql1:
# protocol: mysql
# port: 8486
# # address: ''
# # connections_limit: 0
# # mysql:
# # The complete authentication exchange must finish within this timeout.
# handshake_timeout: 10s
# # read_timeout bounds an in-progress command read.
# read_timeout: 30s
# write_timeout: 30s
# # idle_timeout independently bounds waiting for the next command.
# idle_timeout: 5m
# # MySQL packet framing is currently fixed at the protocol ceiling.
# max_packet_size_bytes: 16777215
# max_query_size_bytes: 1048576
# # MySQL-specific options have no direct TRK_* environment mapping and a
# # structured origin_url does not expand ${VARIABLE}. Authenticator users
# # do support environment expansion. Relevant reloads restart and drain
# # this listener rather than moving established sessions. On Kubernetes,
# # keep a MySQL listener's origin and client credentials in a Secret
# # rather than a shared ConfigMap.
#
# # A listener with protocol postgres accepts PostgreSQL wire-protocol
# # connections and requires exactly one mapped backend: one with provider
# # postgres or timescaledb, or a User Router ALB over such backends (see
# # examples/conf/postgres-user-router.yaml). TLS is negotiated in-band on
# # the same port, so TLS ports are not supported.
# postgres1:
# protocol: postgres
# port: 5432
# # address: ''
# # connections_limit: 0
# # postgres:
# # The startup and authentication exchange must finish within this timeout.
# handshake_timeout: 10s
# read_timeout: 30s
# write_timeout: 30s
# # idle_timeout bounds the wait for a client's next message.
# idle_timeout: 5m
# # statements larger than this are relayed without being analyzed or cached
# max_query_size_bytes: 1048576
# # With an authenticator, clients authenticate with SCRAM-SHA-256. A user
# # stored as a PostgreSQL md5 hash can only log in when allow_md5 is set,
# # and a plaintext exchange over a non-TLS connection only with
# # allow_cleartext_without_tls. Both default to false.
# allow_md5: false
# allow_cleartext_without_tls: false
#
# # A listener with protocol moq accepts MoQ Transport sessions over native
# # QUIC on its UDP port; TLS is part of the QUIC handshake, so TLS ports are
# # not supported, and a backend it serves must provide a certificate in its
# # tls block. Several moq backends may share one listener: a session is
# # routed by the AUTHORITY and PATH of its SETUP against each backend's hosts
# # and paths. A moq listener may share its UDP port with an HTTP/3 endpoint,
# # or another moq listener, as long as their drafts differ.
# moq1:
# protocol: moq
# port: 443
# # address: ''
# # moq:
# # the client's SETUP must arrive within this timeout
# handshake_timeout: 5s
# # the QUIC idle timeout of the listener's connections
# idle_timeout: 2m
# max_sessions: 10000
# max_requests_per_session: 1024
# # advertised to clients in SETUP
# max_filter_ranges: 16
# max_request_updates: 64
# # accepted MoQ Transport drafts, most preferred first
# drafts: [22, 21, 20]
# # the MOQT_IMPLEMENTATION setup option; defaults to trickster
# implementation: ''
# # when the listener stops, each session gets a GOAWAY naming this moqt
# # URI to continue at, and a new request is redirected there; empty has
# # clients reconnect where they were. Changing it restarts nothing.
# goaway_uri: ''
#
# # A ClickHouse listener accepts the Native binary protocol and maps to one
# # ClickHouse backend through that backend's listener_names option.
# clickhouse-native:
# protocol: clickhouse
# port: 8487
# # address: ''
# # connections_limit: 0
#
# # A flight-sql listener accepts Apache Arrow Flight SQL (gRPC) connections
# # and maps to one InfluxDB backend through that backend's listener_names
# # option. See /docs/influxdb.md for full details. InfluxDB 3.x only.
# influx3-flight:
# protocol: flight-sql
# port: 8485
# # address: ''
# # connections_limit: 0
#
# # A listener with protocol tcp relays each connection's bytes, unread, to
# # its one mapped backend: a reverseproxy (rp) backend whose origin_url
# # supplies the host and port to dial, or an alb backend (mechanism rr)
# # whose pool members are such backends, each connection committed to one
# # member by weighted round robin. See docs/configuring.md#stream-listeners
# postgres:
# protocol: tcp
# port: 5432
# # address: ''
# # connections_limit bounds the connections relayed at once; for a udp
# # listener it bounds the sessions held at once, 1024 when unset
# # connections_limit: 0
# # stream tunes the relay for the tcp, tls and udp protocols
# stream:
# # connect_timeout bounds the lookup and dial of the backend and, on a
# # tls listener, the wait for the client's ClientHello. Default: 10s
# connect_timeout: 10s
# # idle_timeout closes a connection over which no byte has moved in
# # either direction for this long, or ends a udp session that carried
# # no datagram for this long. Default: none for tcp and tls, 60s for udp
# idle_timeout: 0s
#
# # A listener with protocol tls relays TLS connections unterminated: the
# # server name the client offers selects the mapped backend whose hosts
# # name it, or the one mapped backend with no hosts, and the backend
# # terminates TLS itself. tls_port and tls_runtime_certs do not apply.
# sni:
# protocol: tls
# port: 8443
#
# # A listener with protocol udp relays each client's datagrams to its one
# # mapped backend over a session of its own, ended once idle. A udp listener
# # binds its own port space, so it may share a port number with a tcp one.
# dns:
# protocol: udp
# port: 5353
# caches:
# default:
# # provider defines what kind of cache Trickster uses
# # options are bbolt, badger, filesystem, memory, redis and valkey
# # The default is memory.
# provider: memory
# ## Configuration options for the Cache Index
# # The Cache Index handles key management and retention for bbolt, filesystem and memory
# # Redis, Valkey and BadgerDB handle those functions natively and do not use the Tricksters Cache Index
# index:
# # reap_interval defines how long the Cache Index reaper sleeps between reap cycles. Default is 3 (3s)
# reap_interval: 3s
# # flush_interval sets how often the Cache Index saves its metadata to the cache from application memory. Default is 5 (5s)
# flush_interval: 5s
# # index_expiry defines how long a Trickster instance will retain its cache index on startup. Default is 1 year (365 days * 24 hours = 8760 hours)
# index_expiry: 8760h
# # max_size_bytes indicates how large the cache can grow in bytes before the Index evicts least-recently-accessed items. default is 512MB
# max_size_bytes: 536870912
# # max_size_backoff_bytes indicates how far below max_size_bytes the cache size must be to complete a byte-size-based eviction exercise. default is 16MB
# max_size_backoff_bytes: 16777216
# # max_size_objects indicates how large the cache can grow in objects before the Index evicts least-recently-accessed items. default is 0 (infinite)
# max_size_objects: 0
# # max_size_backoff_objects indicates how far under max_size_objects the cache size must be to complete object-size-based eviction exercise. default is 100
# max_size_backoff_objects: 100
# # scan_interval defines how long the Cache Index waits between sweeps of the cache, in which it lists objects it
# # did not know of and drops those the cache no longer holds. 0 disables the periodic sweep. default is 24h
# scan_interval: 24h
# # scan_batch_size is how many objects a sweep of the cache reads before it pauses. default is 512
# scan_batch_size: 512
# # scan_batch_pause is how long a sweep of the cache pauses after each batch of objects. default is 50ms
# scan_batch_pause: 50ms
# ## Configuration options when using a Memory Cache #######
# memory:
# # max_size_bytes is the maximum total byte cost will admit to the cache.
# # unlike index.max_size_bytes (a soft eviction threshold), this is enforced at
# # admission time. default is 512MB
# max_size_bytes: 536870912
# # num_counters is the number of keys to track for admission and eviction decisions. This is not a hard limit but a max sampling size.
# # Recommended to use ~10x the number of unique keys you expect to hold for full utilization.
# # default is 500000
# num_counters: 500000
# ## Configuration options when using a Redis Cache (provider: redis)
# ## The redis provider serves Redis and compatible servers, Valkey included, with a pooled
# ## connection per command. A valkey cache takes these same options under 'valkey' instead.
# redis:
# # client_type indicates which kind of Redis client to use. Options are: standard, cluster and sentinel
# # default is standard
# client_type: standard
# ## Supported by Redis (standard) #####################################
# ## These configurations are ignored by Redis Sentinel and Redis Cluster
# ##
# # endpoint defines the fqdn+port or path to a unix socket file for connecting to redis
# # default is redis:6379
# endpoint: redis:6379
# ## Supported by Redis Cluster and Redis Sentinel #####################
# ## These configurations are ignored by Redis (standard)
# ##
# # endpoints is used for Redis Cluster and Redis Sentinel to define a list of endpoints
# # default is [redis:6379]
# endpoints:
# - redis:6379
# ## Supported by Redis Sentinel #######################################
# ## These configurations are ignored by Redis (standard) and Redis Cluster
# ##
# # sentinel_master should be set when using Redis Sentinel to indicate the Master Node
# sentinel_master: ''
# ## Supported by all Redis Client Types ###############################
# ## See docs/caches.md for how these settings apply to the client
# # protocol defines the protocol for connecting to redis (unix or tcp). tcp is default
# protocol: tcp
# # username provides the redis username. default is empty string ''
# username: ''
# # password provides the redis password. default is empty string ''
# password: ''
# # db is the Database to be selected after connecting to the server. default is 0
# db: 0
# # max_retries is the maximum number of times a read is retried after a network error. default is 3,
# # and -1 disables retries. writes are not retried
# max_retries: 0
# # min_retry_backoff is the minimum backoff time between each retry
# min_retry_backoff: 8ms
# # max_retry_backoff is the maximum backoff time between each retry
# max_retry_backoff: 512ms
# # dial_timeout is the timeout for establishing new connections
# dial_timeout: 5s
# # read_timeout and write_timeout bound a command's wait on its connection; the longer of the two applies.
# # default is 3s. If reached, commands will fail with a timeout instead of blocking.
# read_timeout: 3s
# write_timeout: 3s
# # pool_size is the maximum number of socket connections to each server. default is 10 per CPU
# pool_size: 20
# # min_idle_conns is the minimum number of idle connections which is useful when establishing new connection is slow.
# min_idle_conns: 0
# # max_conn_age is the connection age at which client retires (closes) the connection.
# max_conn_age: 0ms
# # pool_timeout has no effect: a command waits for a pooled connection until one frees, within the
# # connection's timeouts. It is accepted so that existing configurations still load
# pool_timeout: 4000ms
# # idle_timeout is the amount of time after which client closes idle connections.
# idle_timeout: 5m
# # use_tls indicates if the Redis server uses TLS encryption. default is false
# use_tls: false
# ## Configuration options when using a Valkey Cache (provider: valkey) ##
# ## A valkey cache takes every option of the redis section above, with the defaults it lists except
# ## endpoint and endpoints, which default to valkey:6379, plus these Valkey-only settings.
# ## A redis cache can't have a valkey section, nor a valkey cache a redis section.
# valkey:
# client_type: standard
# endpoint: valkey:6379
# # in cluster mode, db selects a numbered database, which Valkey 9 serves when its
# # cluster-databases is above the db. default is 0
# db: 0
# # auto_pipelining shares connections among concurrent commands. when false, each command takes a
# # pooled connection of its own, as with the redis provider. it suits caches of small objects only,
# # since a small read pipelined behind a multi-megabyte reply waits for it. default is false
# auto_pipelining: false
# # pipeline_multiplex is the log2 of the pipelined connections to each node, from 0 (one connection)
# # to 8. when unset, the client uses up to 4 for a single server and 1 for each cluster node
# pipeline_multiplex: 2
# # max_flush_delay pauses the pipeline's write loop up to this long, to send more commands per
# # write. default is 0
# max_flush_delay: 0s
# # read_buffer_bytes and write_buffer_bytes size each connection's buffers. default is 524288
# read_buffer_bytes: 524288
# write_buffer_bytes: 524288
# replica_reads:
# # mode is where cache reads go: none (the primary), prefer_replica, az_affinity (a replica in
# # availability_zone) or az_affinity_with_primary (any node in availability_zone). default is none
# mode: none
# # availability_zone is this instance's zone, which the az_affinity modes require
# availability_zone: ''
# # replica_endpoints lists read replicas of a standard (single server) client
# replica_endpoints: []
# client_side_cache:
# # enabled keeps recently read objects in this process, invalidated by the server. default is false
# enabled: false
# # mode is optin, where the server tracks the keys read through the cache, or broadcast, where it
# # tracks every key under prefixes. default is optin
# mode: optin
# # prefixes are the key prefixes tracked in broadcast mode
# prefixes: []
# # size_bytes_per_connection is the cache budget of each connection to each node. default is 16MB
# size_bytes_per_connection: 16777216
# # max_ttl caps how long an object is kept; the server's TTL for it can shorten it. default is 30s
# max_ttl: 30s
# ## Configuration options when using a Filesystem Cache ###############
# filesystem:
# # cache_path defines the directory location under which the Trickster cache will be maintained
# # default is /tmp/trickster
# cache_path: /tmp/trickster
# # min_free_bytes is the space to keep free on the filesystem that holds cache_path. when less is free, the
# # cache evicts least-recently-accessed items as it does when it is over max_size_bytes. default is 0 (disabled)
# min_free_bytes: 0
# ## Configuration options when using a bbolt Cache ####################
# bbolt:
# # filename defines the file where the Trickster cache will be maintained
# # default is trickster.db
# filename: trickster.db
# # bucket defines the name of the bbolt bucket (similar to a namespace) under which our key value store lives
# # default is trickster
# bucket: trickster
# ## Configuration options when using a Badger cache ###################
# badger:
# # directory defines the directory location under which the Badger data will be maintained
# # default is /tmp/trickster
# directory: /tmp/trickster
# # value_directory defines the directory location under which the Badger value log will be maintained
# # default is /tmp/trickster
# value_directory: /tmp/trickster
# ## Configuration options when using cache chunking ###################
# # Determines if cache chunking should be used. The following two options have no effect if false. Default value is false.
# use_cache_chunking: true
# # Determines the size of cache chunks that store timeseries data.
# # Timeseries chunks are split by *duration*, not by literal size; the factor determines how large these chunks are
# # based on the timestep of the provided query. Default value is 420.
# timeseries_chunk_factor: 420
# # Determines the size of cache chunks that store byterange data.
# # Byterange chunks are split by literal size in bytes. Default value is 4096.
# byterange_chunk_size: 4096
# # Example of a second cache, sans comments, that backend configs below could use with: cache_name: bbolt_example
# bolt_example:
# provider: bbolt
# bbolt:
# filename: trickster.db
# bucket: trickster
# index:
# reap_interval: 3s
# flush_interval: 5s
# max_size_bytes: 536870912
# size_backoff_bytes: 16777216
# # Negative Caching Configurations
# # A Negative Cache is a map of HTTP Status Codes that are cached for the specified duration,
# # used for temporarily caching failures (e.g., 404s for 10 seconds)
# #
# # By default, each Origin Configuration maps to the default negative cache which you can
# # configure below, or can define your own negative caches, and specify them in your backend configs.
# # See /docs/negative-caching.md for more info.
# #
# negative_caches:
# # default:
# # The default negative cache config, mapped by all backends by default,
# # is empty unless you populate it. Update it by adding entries here in the format of:
# # "code": ttl
# # Heres a pre-populated negative cache config ready to be uncommented and used in a backend config
# # The general negative cache config will cache common failure response codes for 3 seconds
# general:
# "400": 3s
# "404": 3s
# "500": 3s
# "502": 3s
# # IP access lists. Attach one with ip_acl_name on a listener, backend, or path.
# # See docs/ip-acl.md. Files are read when the configuration is loaded or reloaded; a reload is skipped while no
# # configuration file has changed, so touch a configuration file after editing only a list file.
# ip_acls:
# office:
# # match is longest (default) or ordered. longest uses the longest matching
# # prefix, and deny wins when the same prefix is both allowed and denied.
# match: longest
# # default is the verdict when nothing matches. deny (default) or allow.
# default: deny
# allow: [10.0.0.0/8, 192.168.1.5, 2001:db8::/32]
# deny: [10.0.99.0/24]
# # allow_file and deny_file are one address or CIDR per line. Blank lines
# # and lines whose first non-space character is # are skipped.
# # allow_file: /etc/trickster/office-allow.lst
# # deny_file: /etc/trickster/blocklist.lst
# # source is client_ip (default) or peer. peer is listener scope only.
# source: client_ip
# # action is reject (default) or drop. drop is not valid on a backend or
# # path that HTTP serves.
# action: reject
# # status is the HTTP status used when action is reject. 400-599; default 403.
# status: 403
# # ordered judges rules from top to bottom. allow, deny, and *_file are
# # refused in this mode; each rule sets exactly one of them.
# legacy:
# match: ordered
# default: deny
# rules:
# - deny: 10.1.2.0/24
# - allow: 10.0.0.0/8
# - deny: all
# # Named rate limiters. Attach one with rate_limiter_name on a listener, backend, or path.
# # See docs/rate-limiting.md. A path name replaces the backend limiter; none clears it.
# # The listener limiter is a separate outer layer and is never replaced.
# rate_limiters:
# per-client:
# # keys is 0 to 5 request attributes, in order. Empty means one bucket for everything.
# keys: [client_ip]
# # ipv6_prefix is how many leading bits of an IPv6 client address form client_ip. 1-128; default 64.
# ipv6_prefix: 64
# # algorithm accepts only sliding_window, which is the default.
# algorithm: sliding_window
# # limit is how many events each bucket may take in window.
# limit: 600
# # window is 1s to 1h; default 1m.
# window: 1m
# # missing_key is exempt (default) or shared.
# missing_key: exempt
# # action is reject (default), count, or close. close is stream listeners only.
# action: reject
# # response is the HTTP reply for reject. status is 400-599; default 429.
# # headers overlay the defaults. Cache-Control: no-store is always kept.
# response:
# status: 429
# headers:
# Cache-Control: no-store
# body: "Too Many Requests\n"
# # policy_headers is none (default), ietf, or legacy.
# policy_headers: none
# # max_keys is how many buckets are tracked. Default 100000.
# max_keys: 100000
# # max_keys_action is allow (default) or reject when a new key does not fit.
# max_keys_action: allow
# # unit is requests, connections, sessions, or datagrams. Leave it unset when the
# # limiter is attached on more than one plane.
# # unit: requests
# Configuration options for mapping Origin(s)
backends:
# # example static file server backend, which serves a local directory rather
# # than proxying to an origin. paths, req_rewriter_name, origin_url and other
# # proxying options are not valid for this provider.
# website:
# provider: static
# hosts: [ www.example.com ]
# # authenticator_name optionally requires users to authenticate before any file is served
# # authenticator_name: example_auth_1
# # the static block, and its root, are required when the provider is static
# static:
# # root is the directory holding the content to serve. it must exist
# root: /var/www/html
# # default_file is served when a directory is requested. default is index.html
# default_file: index.html
# # cache_control is the Cache-Control header sent with every file. by default none is
# # sent, and clients judge a file's freshness from its Last-Modified time
# cache_control: no-cache
# # cache_control_by_extension overrides cache_control for matching files
# cache_control_by_extension:
# .js: public, max-age=31536000, immutable
# .css: public, max-age=31536000, immutable
# # response_headers are attached to every response
# response_headers:
# X-Content-Type-Options: nosniff
# # mime_types adds to and overrides the built-in Content-Types by file extension
# mime_types:
# .md: text/markdown; charset=utf-8
# # not_found_file is a file within the root served in place of a plain 404 response.
# # not_found_status is the status it is served with: 404 (the default) for an error
# # page, or 200 for a single-page application whose routes exist only in the browser
# not_found_file: errors/404.html
# not_found_status: 404
# # directory_listing lists a directory that has no default_file, rather than
# # answering it with a 404. default is false
# directory_listing: false
# # cache configures the fileserver cache, which holds small files in memory and drops
# # them when they change on disk. it is separate from, and unrelated to, the caches
# # configured in the caches section, and a static backend does not use a cache_name
# cache:
# # disabled serves every request from disk. default is false
# disabled: false
# # max_file_size_bytes is the largest file held in memory. default is 1048576 (1 MiB)
# max_file_size_bytes: 1048576
# # max_size_bytes is the most memory the cache will use, counting each held file
# # as its size plus 1 KiB of bookkeeping. default is 134217728 (128 MiB)
# max_size_bytes: 134217728
# # max_files is the most objects held (a file, and each compressed rendition of it, is
# # one), which also bounds the directories watched. the least recently used make room
# # for new ones once this or max_size_bytes is reached. default is 10000
# max_files: 10000
# # revalidation_interval is how often held files are compared to disk, as a
# # backstop to filesystem change events. default is 10s
# revalidation_interval: 10s
# # example mysql backend, exposed by a listener with protocol mysql (see the
# # listeners section). MySQL client connections to the listener are proxied
# # to the origin. Exactly one mysql backend may map to a mysql listener.
# mysql1:
# provider: mysql
# # origin_url uses the mysql scheme; the port defaults to 3306 if omitted
# origin_url: 'mysql://readonly:REDACTED@mysql-origin.example.com:3306/database'
# # Embedded passwords are redacted by sanitized configuration output and
# # YAML stringification. Protect the source file, which has the real value.
# # listener_names must reference a listener whose protocol is mysql
# listener_names: [mysql1]
# # MySQL listeners require a named authenticator. The authenticator's
# # users are used for downstream MySQL native-password authentication.
# authenticator_name: example_auth_1
# cache_name: default
# # timeout bounds both origin connect and query execution. Origin connection
# # admission remains one connection per downstream session.
# timeout: 1m
# max_concurrent_conns: 20
# max_object_size_bytes: 524288
# mysql:
# max_result_rows: 100000
# max_result_size_bytes: 67108864
# # Native health checks connect with the origin credentials and TLS
# # settings above, then execute COM_PING. HTTP matching options do not apply.
# healthcheck:
# interval: 5s
# timeout: 3s
# # Plaintext is accepted by default. When a full_chain_cert_path and
# # private_key_path are configured below, clients may upgrade in-band to
# # TLS. Set require_tls to reject plaintext downstream clients.
# require_tls: true
# tls:
# # Downstream server pair; MySQL upgrades in-band on the listener port.
# full_chain_cert_path: /etc/trickster/tls/server.crt
# private_key_path: /etc/trickster/tls/server.key
# # Upstream verified TLS; add both client fields for mutual TLS.
# certificate_authority_paths:
# - /etc/trickster/tls/origin-ca.crt
# client_cert_path: /etc/trickster/tls/origin-client.crt
# client_key_path: /etc/trickster/tls/origin-client.key
# # Deterministic SELECTs use OPC; supported cadence-aligned time-series
# # SELECTs use DPC. The common cache_name, timeseries_ttl,
# # timeseries_retention_factor, volatile_window, and
# # max_object_size_bytes backend settings apply.
# # GreptimeDB serves HTTP and either or both native protocols. See
# # examples/conf/greptimedb.yaml for the corresponding listeners/authenticator.
# greptimedb1:
# provider: greptimedb
# origin_url: http://greptime.example:4000
# listener_names: [default, greptime-pg, greptime-mysql]
# authenticator_name: greptime-readers
# cache_name: default
# postgres:
# upstream_url: postgres://readonly:REPLACE_ME@greptime.example:4003/public
# mysql:
# upstream_url: mysql://readonly:REPLACE_ME@greptime.example:4002/public
#
# # example postgres backend, exposed by a listener with protocol postgres
# # (see the listeners section). Provider timescaledb is an alias of postgres.
# postgres1:
# provider: timescaledb
# # origin_url uses the postgres scheme; the port defaults to 5432 if omitted.
# # Embedded passwords are redacted by sanitized configuration output.
# origin_url: 'postgres://readonly:REDACTED@tsdb-origin.example.com:5432/database'
# # listener_names must reference a listener whose protocol is postgres
# listener_names: [postgres1]
# # With an authenticator, Trickster authenticates clients itself against
# # its users and logs in to the origin with the origin_url credentials.
# # Without one, the client's own authentication exchange is relayed to the
# # origin unchanged and the origin_url needs no credentials.
# authenticator_name: example_auth_1
# cache_name: default
# # timeout bounds both origin connect and the wait for a cached statement's result
# timeout: 1m
# max_concurrent_conns: 20
# postgres:
# # TLS toward the origin: disable (default), require, verify-ca or
# # verify-full, as libpq's sslmode. CAs and a client pair come from tls below.
# upstream_tls_mode: verify-full
# # a larger result is relayed to the client without being cached
# max_result_rows: 100000
# max_result_size_bytes: 67108864
# # The native health check logs in to the origin on a fresh connection with
# # the origin_url credentials and waits for ReadyForQuery; without origin
# # credentials it only confirms the origin accepts connections. HTTP
# # matching options do not apply.
# healthcheck:
# interval: 5s
# timeout: 3s
# # When a server certificate is configured, clients may upgrade in-band to
# # TLS. Set require_tls to refuse plaintext clients.
# require_tls: true
# tls:
# full_chain_cert_path: /etc/trickster/tls/server.crt
# private_key_path: /etc/trickster/tls/server.key
# certificate_authority_paths:
# - /etc/trickster/tls/origin-ca.crt
# # Deterministic SELECTs use OPC; time_bucket, date_bin and epoch-floor
# # time-series SELECTs use DPC. The common cache_name, timeseries_ttl,
# # timeseries_retention_factor, volatile_window, sharding and
# # max_object_size_bytes backend settings apply. proxy_only: true relays
# # every statement without inspecting it.
# # example MoQ Transport relay backend, exposed by a listener with protocol
# # moq (see the listeners section), and to browsers by WebTransport through
# # an http listener with http3 enabled. One upstream subscription per track
# # is shared by every downstream subscriber; the newest groups stay in memory
# # and older ones spill to cache_name, which FETCH and fills read back.
# moq1:
# provider: moq
# # a native QUIC origin (moqt://) or a WebTransport one (https://); omit
# # origin_url to serve only what publishers send
# origin_url: 'moqt://origin.example.com:443/live'
# # on an http listener, the backend's paths accept WebTransport sessions
# # (extended CONNECT) on the listener's HTTP/3 endpoint
# listener_names: [moq1, default]
# # matched against the AUTHORITY and PATH of a session's SETUP, or the
# # CONNECT request that opens a WebTransport session
# hosts: [live.example.com]
# cache_name: default
# # caps MAX_CACHE_DURATION, and is the lifetime of spilled groups of tracks that set none
# max_ttl: 1h
# moq:
# upstream:
# # in place of origin_url, an alb backend whose pool are moq backends
# # with origins: each track is subscribed through one member, a
# # strategy keyed on the flow (hrw) placing it by its full name, and a
# # track whose origin is lost moves to another member without its
# # subscribers noticing. The alb's mechanism is rr, p2c, hrw or lc;
# # stream.passive_health ejects members whose origins cannot be reached.
# # alb: origins
# # drafts offered to the origin, most preferred first
# drafts: [21, 20]
# # keep the upstream subscription forwarding while every subscriber is paused
# prewarm: false
# reconnect_backoff: 1s
# # keep an upstream subscription this long after its last subscriber leaves
# linger: 5s
# max_gap_fetches: 16
# live_edge:
# # groups of each track kept in memory
# groups: 3
# # payload bytes the live edge holds across all of the backend's tracks
# max_size_bytes: 67108864
# # false keeps only the live edge, so older groups are fetched from the origin
# spill: true
# # the wait for upstream fetches when a FETCH or fill names no FILL_TIMEOUT
# fill_timeout: 2s
# max_object_size_bytes: 67108864
# webtransport:
# # drafts accepted from WebTransport clients, most preferred first
# drafts: [22, 21, 20]
# # the draft assumed for a client offering no WT-Available-Protocols,
# # and for a WebTransport origin answering without WT-Protocol; 0
# # refuses both
# default_draft: 0
# # browser origins (scheme://host[:port]) that may open sessions, or
# # '*'; empty allows only an origin naming the requested host
# allowed_origins: []
# max_sessions: 10000
# # when the http listener stops, each WebTransport session gets a GOAWAY
# # naming this https URI to continue at; empty reuses the current one
# goaway_uri: ''
# publish:
# # accept PUBLISH and PUBLISH_NAMESPACE, making Trickster the origin of
# # what publishers send; open ingest belongs behind a network boundary
# enabled: false
# # namespace prefixes publishers may claim, as fields joined by '/',
# # such as live/studio; empty allows any
# namespaces: []
# max_publishers_per_track: 4
# authorization:
# # none admits every request; token requires an AUTHORIZATION_TOKEN
# # that token_file grants, one '<token> <publish|subscribe|any>
# # [namespace]' per line, read again whenever the file changes
# mode: none
# # the health check completes a SETUP exchange with the origin on a fresh session
# healthcheck:
# interval: 5s
# tls:
# # served to clients of the moq listener and the http listener's TLS port
# full_chain_cert_path: /etc/trickster/tls/server.crt
# private_key_path: /etc/trickster/tls/server.key
# # used toward the origin
# certificate_authority_paths:
# - /etc/trickster/tls/origin-ca.crt
# # example VictoriaMetrics backend: MetricsQL through the Prometheus querying
# # API and the Graphite APIs. See /docs/victoriametrics.md.
# vm1:
# provider: victoriametrics
# # single-node VictoriaMetrics, or a tenant's vmselect path such as
# # http://vmselect:8481/select/0/prometheus
# origin_url: 'http://victoriametrics:8428'
# cache_name: default
# # keep it longer than the origin's -search.latencyOffset. default is 60s
# # volatile_window: 60s
# victoriametrics:
# # the upstream path of the Graphite APIs. By default it is the origin
# # URL's path, with a trailing /prometheus replaced by /graphite
# # graphite_path: /select/0/graphite
# # set when the origin runs with -search.disableCache, under which it
# # keeps the requested grid of long range queries. default is false
# # search_disable_cache: false
#
# # example graphite backend. Graphite is an ordinary HTTP backend; the
# # settings below are the Graphite-specific ones. See /docs/graphite.md.
# graphite1:
# provider: graphite
# origin_url: 'http://graphite.example.com:80'
# cache_name: default
# # Graphite is fetched at its native resolution so one cached series can
# # serve every panel width, which makes its responses larger and longer
# # than most providers'. These two therefore default to 64MB and 524288
# # points for graphite backends, rather than to the generic 512KB and
# # 1024, and only need setting here to override that. A response larger
# # than max_object_size_bytes cannot be delta-cached and is served
# # unaccelerated instead; a series longer than
# # timeseries_retention_factor is cropped and refetched.
# # max_object_size_bytes: 67108864
# # timeseries_retention_factor: 524288
# graphite:
# # time_zone interprets date-anchored from/until values (midnight,
# # today, MM/DD/YY) when a request carries no tz parameter. Set it to
# # the origin's graphite-web TIME_ZONE. default is UTC
# time_zone: UTC
#
# # origin_username/origin_password supply a static HTTP Basic
# # credential sent as the Authorization header of every upstream
# # request (proxied, synthetic and health check alike). For non-Basic
# # schemes, set origin_authorization to the verbatim header value
# # (e.g., 'Bearer <token>') instead. unset by default
# # origin_username: 'metrics'
# # origin_password: '<the origin password>'
# # origin_authorization: 'Bearer <token>'
#
# # passthrough_max_data_points forwards the client's maxDataPoints to
# # the origin instead of fetching at native resolution and
# # consolidating in Trickster. Requests carrying maxDataPoints are then
# # served unaccelerated, so the origin's consolidation is byte-identical.
# # Leave false unless you need that guarantee: true largely disables
# # acceleration for Grafana, which sends maxDataPoints on every panel.
# # default is false
# passthrough_max_data_points: false
#
# # find_cache_ttl is how long a wildcard target's expansion to concrete
# # metric paths is reused before being refreshed from /metrics/expand.
# # Lower it if metrics appear and disappear frequently. default is 1m
# find_cache_ttl: 1m
#
# # requests over either shape limit are served through the object
# # cache untouched rather than accelerated: max_targets_per_request
# # bounds the target count (default 128) and max_target_length one
# # target expression's bytes (default 16384)
# max_targets_per_request: 128
# max_target_length: 16384
#
# # a wildcard expansion matching more leaves than max_expanded_leaves,
# # or more aggregate leaf-name bytes than max_expansion_bytes, is
# # likewise served through the object cache untouched
# max_expanded_leaves: 4096
# max_expansion_bytes: 2097152
#
# # the resolution registry remembers each metric's archive ladder, so
# # that a query's step can be predicted without asking the origin
# resolution_registry:
# # ttl is how long a learned ladder is trusted. Whisper ladders only
# # change when an operator runs whisper-resize.py, so this is long.
# # default is 24h
# ttl: 24h
# # negative_ttl is the initial backoff after a failed resolution; it
# # doubles per consecutive failure, up to 10m. default is 30s
# negative_ttl: 30s
# # max_entries bounds each registry layer. default is 100000
# max_entries: 100000
# # persist writes learned ladders through to this backend's cache, so
# # a restart does not relearn them. default is true
# persist: true
# # probe_concurrency caps simultaneous ladder-learning runs.
# # default is 2
# probe_concurrency: 2
# # probe_budget caps the probes a single learning run may issue.
# # default is 96
# probe_budget: 96
#
# # static_retentions seeds the registry with retentions matching your
# # storage-schemas.conf. Entries are ordered and first-match-wins, exactly
# # as carbon applies them. This is a seed and an override, never the sole
# # source of truth: a match yields Configured confidence and is confirmed
# # by probe, and the probe wins when they disagree. That matters because
# # a Whisper file keeps whatever ladder it was created with, so
# # storage-schemas.conf and the files on disk routinely differ.
# static_retentions:
# - pattern: '^collectd\.'
# retentions: '10s:6h,1m:7d,10m:5y'
# - pattern: '.*'
# retentions: '1m:2d,5m:30d,1h:2y'
# example backend named default. default is always created with these settings unless a different backend is defined here.
# access this backend via http[s]://trickster-fqdn/default/ unless path_routing_disabled is true
default:
# listener_names maps this backend to compatible inbound listeners.
# Unbound ordinary backends use default; mgmt and metrics are reserved.
listener_names: [default]
# ip_acl_name applies a named ip_acls entry to every route of this backend.
# A path's ip_acl_name replaces it. none is not valid on a backend.
# ip_acl_name: office
# provider identifies the backend provider.
# Valid options are: prometheus, influxdb, clickhouse, graphite, mysql, rule, alb,
# reverseproxycache (or just rpc), or reverseproxy (or just rp)
provider: prometheus
# replica_group identifies the logical shard represented by this backend in
# Time Series Merge pools. Backends with the same value are HA replicas.
# When omitted, it defaults to this backend's name, making it a unique shard.
# Replica Groups can only be set on TSM-compatible backends (currently
# Prometheus) or nested ALBs used directly as members of a TSM pool.
# replica_group: shard-a
# for prometheus backends, you can configure label injection as follows:
# prometheus:
# labels:
# labelname: value
# # flavor applies a Prometheus-compatible product's routes, limits and defaults.
# # cloudwatch: Amazon CloudWatch PromQL; amp: Amazon Managed Service for Prometheus.
# # See /docs/aws.md. mimir and thanos select the series_api below. Default is none.
# flavor: cloudwatch
# # series_api is how the backend serves raw series to an ALB using tsm global evaluation:
# # remote_read (the mimir flavor's default) or storeapi (the thanos flavor's default).
# # See /docs/prometheus.md#series-sources. Default is none.
# series_api: remote_read
# # series_endpoint is where series_api is served: an http(s) remote-read URL, by default the
# # origin_url path plus /api/v1/read, or the grpc:// or grpcs:// address StoreAPI requires
# series_endpoint: grpc://prometheus-sidecar:10901
# origin_url provides the base upstream URL for all proxied requests to this origin.
# it can be as simple as http://example.com or as complex as https://example.com:8443/path/prefix
# origin_url is a required configuration value
origin_url: http://prometheus:9090
# # protocol selects the upstream wire protocol used to communicate with the origin.
# # When empty (default), HTTP is used. Supported values are provider-specific:
# # clickhouse: 'native' — speak the native binary protocol to an upstream on port 9000
# # This is independent of listeners, which select the inbound protocol.
# protocol: ''
# # h2c_prior_knowledge speaks cleartext HTTP/2 to the origin by prior
# # knowledge, for origins that serve h2c only. Origins that speak HTTP/1.1
# # will fail every request rather than degrade. Requires an http:// origin_url;
# # an https origin already negotiates HTTP/2 via ALPN, and it cannot be combined
# # with a non-HTTP upstream protocol such as clickhouse's 'native'.
# # Default: false
# h2c_prior_knowledge: false
# # preserve_host sends the Host header exactly as the client sent it to the
# # origin, instead of the origin's own host, and the client's Host then joins
# # the cache key. A Host entry in a path's request_headers with a value, or a
# # -Host entry, still replaces it and leaves the key alone; an empty Host
# # entry changes nothing. Default: false
# preserve_host: false
# # origin_resolution selects how the origin host is resolved when dialing. With mode srv,
# # the origin_url host (or a host set by a request rewriter) is a DNS SRV owner name, and
# # each connection goes to a target and port from the SRV answer; the URL port is ignored.