Configuration
Despite the fact that there are a huge number of parameters in the configuration, not all of them are supported by UI at the moment. As the UI evolves, more and more of the parameters will be relevant.
The configuration is set via a yaml-file and consists of three sections:
- server - seq-ui server configutarion
- clients - seq-db clients configuration
- handlers - seq-ui api handlers configuration
You can specify your config file when running seq-ui by providing it with flag --config:
go run ./cmd/seq-ui --config <path-to-config-file>
Config examples
See config examples in config directory:
- example - the minimal config
Server
server:
http_addr:
grpc_addr:
debug_addr:
grpc_connection_timeout:
http_read_timeout:
http_read_header_timeout:
http_write_timeout:
cors:
jwt_secret_key:
oidc:
rate_limiters:
cache:
db:
clickhouse:
gRPC/HTTP server
http_addr string required
Host for HTTP server.
grpc_addr string required
Host for gRPC server.
debug_addr string required
Host for debug server.
grpc_connection_timeout string default="0"
The timeout for connection establishment (up to and including HTTP/2 handshaking) for all new connections in gRPC server. A zero or negative value will result in an immediate timeout.
The value must be passed in the duration format:
<number>(ms|s|m|h).
http_read_timeout string default="0"
The maximum duration for reading the entire request, including the body. A zero or negative value means there will be no timeout.
The value must be passed in the duration format:
<number>(ms|s|m|h).
http_read_header_timeout string default="0"
The amount of time allowed to read request headers. If zero, the value of http_read_timeout is used. If both are zero or negative value, there is no timeout.
The value must be passed in the duration format:
<number>(ms|s|m|h).
http_write_timeout string default="0"
The maximum duration after header is read and before timing out writes of the response. A zero or negative value means there will be no timeout.
The value must be passed in the duration format:
<number>(ms|s|m|h).
cors CORS optional
HTTP server CORS config. If not set, no CORS settings will be applied.
CORS fields:
-
allowed_origins[]stringdefault=["*"]A list of origins a cross-domain request can be executed from. If the special
"*"value is present in the list, all origins will be allowed. -
allowed_methods[]stringdefault=["HEAD", "GET", "POST", "PATCH", "DELETE"]A list of methods the client is allowed to use with cross-domain requests.
-
allowed_headers[]stringdefault=[]A list of non simple headers the client is allowed to use with cross-domain requests. If the special
"*"value is present in the list, all headers will be allowed."Origin"header is always appended to the list. -
exposed_headers[]stringdefault=[]Indicates which headers are safe to expose to the API of a CORS API specification.
-
allow_credentialsbooldefault=falseIndicates whether the request can include user credentials like cookies, HTTP authentication or client side SSL certificates.
-
max_ageintdefault=0Indicates how long (in seconds) the results of a preflight request can be cached.
-
options_passthroughbooldefault=falseInstructs preflight to let other potential next handlers to process the OPTIONS method. Turn this on if you handles
OPTIONS.
Auth
jwt_secret_key string default=""
If set to non-empty string, JWT provider is created for API tokens verification.
API tokens allow access only for [
/seqapi/*,/massexport/*] routes in HTTP API and [SeqAPIService,MassExportService] service in gRPC API. For other routes/services requiring auth, OIDC check will be performed, sojwt_secret_keyshould be used in pair withoidc.
oidc OIDC optional
Open ID Connect config. If not set, no OIDC verification will be applied.
OIDC fields:
-
auth_urls[]stringrequiredList of OIDC auth URLs for sending verification requests. For each verification, the entire
auth_urlslist will be searched, choosing a URL. -
root_castringdefault=""Path to file with CA root certificate or the certificate itself. If set, it will be passed to OIDC client tls config.
-
ca_certstringdefault=""Path to file with CA certificate or the certificate itself. If set, it will be passed to OIDC client tls config.
-
private_keystringdefault=""Path to file with private key generated with CA certificate or the private key itself. If set, it will be passed to OIDC client tls config.
-
ssl_skip_verifybooldefault=falseIf set, disables security checks on OIDC client.
-
allowed_clients[]stringdefault=[]List of allowed clients. If set, only the specified clients will be verified. The
Audiencetoken field is used. -
skip_verifybooldefault=falseIf set, only the issuer and expiration are checked locally without requests to
auth_urls. -
cache_secret_keystringdefault=""If set to non-empty string, OIDC tokens are cached using
cache_secret_keyuntil the token expiration.
Rate limiting
rate_limiters map[string]ApiRateLimiters optional
gRPC and HTTP server rate limiters configs. If not set, rate limiting will not be applied.
Map key is HTTP API base route or gRPC API service name:
seqapi,userprofile,dashboards,massexport,errorgroupsSeqAPIService,UserProfileService,DashboardsService,MassExportService,ErrorGroupsService
ApiRateLimiters fields:
-
defaultRateLimiterrequiredDescribes default rate limiter for unspecified and unauthorized users.
-
spec_usersmap[string]RateLimiteroptionalDescribes rate limiters for special users and tokens. Key is username or token name.
RateLimiter fields:
-
rate_per_secintrequiredNumber of requests allowed per second. If auth is active, each user gets personal quota, otherwise the quota is general for all requests.
The app utilizes rate limiter based on Generic Cell Rate Algorithm (GCRA). If
max_burstis set to zero, the next request will be allowed after(1 sec / rate_per_sec)time (e.g.rate_per_secis set to 2, then the next request will be allowed after 500ms). -
max_burstintdefault=0Number of requests that will be allowed to exceed the rate in a single burst.
Total amount of requests allowed per second can be higher than
rate_per_sec, ifmax_burstis greater than zero. -
store_max_keysintdefault=0Max amount of keys to be stored in rate limiter store. A zero or negative value means that the amount of keys is considered unlimited.
-
per_handlerbooldefault=falseIf set, every API handler will be limited separately.
Cache
cache Cache optional
Cache config.
Cache fields:
-
inmemoryInmemoryCacheoptionalConfig for in-memory cache.
If not set, it will be applied with default values.
-
redisRedisoptionalConfig for redis cache.
It works in pair with in-memory cache:
-
when a key-value pair sets in redis, it's also sets in in-memory cache
-
when in-memory cache contains the key, the request to redis doesn't occur
-
when in-memory cache doesn't contain the key, but redis contains, the redis result sets in in-memory cache
If redis isn't available, it falls back to in-memory cache.
-
InmemoryCache fields:
-
num_countersintdefault=1e7The number of counters (keys) to keep that hold access frequency information. If set to zero or negative value, then it will be reset to
default.It's generally a good idea to have more counters than the max cache capacity (
max_cost), as this will improve eviction accuracy and subsequent hit ratios. -
max_costintdefault=1e6Cache capacity. If set to zero or negative value, then it will be reset to
default. -
buffer_itemsintdefault=64Determines the size of Get buffers. If set to zero or negative value, then it will be reset to
default.
Redis fields:
-
addrstringrequiredAddress in
host:portformat. -
usernamestringdefault=""Username to authenticate the connection when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
-
passwordstringdefault=""Password specified in the
requirepassserver configuration option (if connecting to a Redis 5.0 instance, or lower), or the User Password when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system. -
timeoutstringdefault="3s"Read/write timeout. If set to
-1, disables timeout.The value must be passed in the duration format:
<number>(ms|s|m|h). -
max_retriesintdefault=3Maximum number of retries before giving up. If set to
-1, disables retries. -
min_retry_backoffstringdefault="8ms"Minimum backoff between each retry. If set to
-1, disables backoff.The value must be passed in the duration format:
<number>(ms|s|m|h). -
max_retry_backoffstringdefault="512ms"Maximum backoff between each retry. If set to
-1, disables backoff.The value must be passed in the duration format:
<number>(ms|s|m|h).
External storages
db DB optional
PostgreSQL database config.
Required for
/userprofileandseqapi/v1/async_search/handlers.
DB fields:
-
namestringrequiredDatabase name.
-
hoststringrequiredDatabase host.
-
portintrequiredDatabase port.
-
userstringrequiredDatabase username.
-
passstringrequiredDatabase password.
-
connection_pool_capacityintrequiredThe maximum connection pool size.
-
request_timeoutstringrequiredTimeout for all database requests.
The value must be passed in the duration format:
<number>(ms|s|m|h). -
use_prepared_statementsbooldefault=trueIf set to
false, disables the use of postgres prepared statements.
clickhouse ClickHouse optional
Required for
/errorgroupshandlers.
ClickHouse database config.
ClickHouse fields:
-
databasestringrequiredDatabase name.
-
usernamestringrequiredDatabase username.
-
passwordintrequiredDatabase password.
-
dial_timeoutintdefault="5s"Database dial timeout. If set to zero or negative value, then it will be reset to
default.The value must be passed in the duration format:
<number>(ms|s|m|h). -
read_timeoutintdefault="30s"Database read timeout. If set to zero or negative value, then it will be reset to
default.The value must be passed in the duration format:
<number>(ms|s|m|h). -
shardedbooldefault=falseIndicates whether the clickhouse is sharded. It is used for some queries that depend on the clickhouse scheme.
Clients
clients:
seq_db_addrs:
proxy_client_mode:
seq_db_timeout:
seq_db_avg_doc_size:
request_retries:
initial_retry_backoff:
max_retry_backoff:
grpc_keepalive_params:
seq_db_addrs []string required
List of seq-db proxy hosts to be used in client calls. If there are more than one host, for each request random host will be chosen.
proxy_client_mode string default="grpc" options="grpc"
Allow choosing how to send requests to seq-db.
seq_db_timeout string default="0"
Timeout for requests made by the client. A zero value means no timeout.
The value must be passed in the duration format:
<number>(ms|s|m|h).
seq_db_avg_doc_size int default=0
Specifies the average documents size in KB that the client calls returns. It's used in combination with handlers.seq_api.max_search_limit to calculate the maximum response size per client request.
Regardless of
seq_db_avg_doc_size, the minimum response size per client request is4MB.
request_retries int default=0
The number of retries to send a request to client after the first attempt. For each retry, the entire seq_db_addrs list will be searched, choosing a random host. A zero value means no retries. If set to negative value, then it will be reset to default.
initial_retry_backoff string default="0"
Initial duration interval value to be used in backoff with retries. If set to 0, disables backoff.
The value must be passed in the duration format:
<number>(ms|s|m|h).
max_retry_backoff string default="0"
Max duration interval value to be used in backoff with retries. If set to 0, only value from initial_retry_backoff is used for calculating backoff and the backoff is not higher than initial_retry_backoff * 2.
The value must be passed in the duration format:
<number>(ms|s|m|h).
grpc_keepalive_params GRPCKeepaliveParams optional
If gRPC keepalive params are not set, no keepalive params are applied to gRPC client.
GRPCKeepaliveParams fields:
-
timestringdefault="10s"After a duration of this time if the client doesn't see any activity it pings the server to see if the transport is still alive. If set below
10s, then it will be reset todefault.The value must be passed in the duration format:
<number>(ms|s|m|h). -
timeoutstringdefault="1s"After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. If set below
1s, then it will be reset todefault.The value must be passed in the duration format:
<number>(ms|s|m|h). -
permit_without_streambooldefault=falseIf set to
true, client sends keepalive pings even with no active RPCs. Otherwise, when there are no active RPCs,timeandtimeoutwill be ignored and no keepalive pings will be sent.
Handlers
handlers:
seq_api:
error_groups:
mass_export:
SeqAPI
seq_api SeqAPI optional
Config for /seqapi API handlers.
SeqAPI fields:
-
max_search_limitintdefault=0Max value for
limitfield in search requests. -
max_search_total_limitintdefault=1e6If search request returns number of events greater than
max_search_total_limit, then the error will return. -
max_search_offset_limitintdefault=1e6Max value for
offsetfield in search requests. -
max_export_limitintdefault=0Max value for
limitfield in export requests. -
seq_cli_max_search_limitintdefault=0The maximum number of logs that can be processed by seq-cli in one search command run.
-
max_parallel_export_requestsintdefault=1Number of parallel export requests allowed. If auth is active, each user gets personal quota, otherwise the quota is general for all requests. If set to zero or negative value, then it will be reset to
default. -
max_aggregations_per_requestintdefault=1Max allowed aggregations per request. If set to zero or negative value, then it will be reset to
default. -
max_buckets_per_aggregation_tsintdefault=200Max allowed buckets per aggregation with timeseries request. The number of buckets is calculated as (
to-from) /interval. If set to zero or negative value, then it will be reset todefault. -
events_cache_ttlstringdefault="24h"TTL for events caching. If not set or set to zero, then it will be reset to
default.The value must be passed in the duration format:
<number>(ms|s|m|h). -
logs_lifespan_cache_keystringdefault="logs_lifespan"Cache key for logs lifespan data. Useful when multiple instances of seq-ui use one Redis cache. If set to empty string, then it will be reset to
default. -
logs_lifespan_cache_ttlstringdefault="10m"TTL for logs lifespan caching. If not set or set to zero, then it will be reset to
default.The value must be passed in the duration format:
<number>(ms|s|m|h). -
fields_cache_ttlstringdefault="0"TTL for fields caching. A zero value means no caching.
The value must be passed in the duration format:
<number>(ms|s|m|h). -
pinned_fields[]PinnedFielddefault=[]List of fields which will be pinned in UI.
PinnedFieldfields:-
namestringrequiredName of field.
-
typestringrequiredoptions="text"|"keyword"Type of field.
-
Error groups
error_groups ErrorGroups optional
Config for /errorgroups API handlers.
ErrorGroups fields:
-
log_tags_mappingLogTagsMappingoptionalMapping of clickhouse column names and
log_tagskeys.LogTagsMappingfields:-
release[]stringdefault=[]log_tagskeys forreleasecolumn. -
env[]stringdefault=[]log_tagskeys forenvcolumn.
-
-
query_filtermap[string]stringoptionalAdditional conditions to be added to clickhouse queries.
Mass export
mass_export MassExport optional
Config for /massexport API handlers.
MassExport fields:
-
batch_sizeintdefault=10000Size of batch to fetch logs from log storage per request.
-
workers_countintrequiredNumber of workers downloading logs from
seq-dband uploading them to file store simultaneously. Must be positive. -
tasks_channel_sizeintdefault=10000000Size of channel that contains time subsegments to export. Must be positive.
-
part_lengthstringdefault="1h"Length of time segment which logs stored in one file.
The value must be passed in the duration format:
<number>(ms|s|m|h). -
url_prefixstringrequiredURL prefix to form links to files in s3. Must be non-empty string.
-
allowed_users[]stringdefault=[]List of users who can use
/massexportAPI.. If it's empty then mass exports allowed for all users; display username isanonymous. -
file_storeFileStorerequiredFile store config.
-
session_storeSessionStorerequiredSession store config.
-
seq_proxy_downloaderSeqProxyDownloaderrequiredseq-db proxy client config.
FileStore fields:
-
s3S3requiredS3 config.
S3fields:endpointstringrequiredaccess_key_idstringrequiredsecret_access_keystringrequiredbucket_namestringrequiredenable_sslbooldefault=false
SessionStore fields:
-
redisRedisrequiredRedis session store config. See
Redisin Cache section. -
export_lifetimestringdefault="168h"Expiration time for all keys stored in redis.
SeqProxyDownloader fields:
-
delaystringdefault="1s"Represents delay between seq-db search queries.
The value must be passed in the duration format:
<number>(ms|s|m|h). -
initial_retry_backoffstringdefault="0"Initial retry backoff if previous query was rate-limited. If it's less than
delay, thendelayvalue will be reset toinitial_retry_backoff.The value must be passed in the duration format:
<number>(ms|s|m|h). -
max_retry_backoffstringdefault="0"Max retry backoff if previous query was rate-limited. If it's less than
initial_retry_backoff, theninitial_retry_backoffvalue will be reset tomax_retry_backoffThe value must be passed in the duration format:
<number>(ms|s|m|h).