Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![CI](https://github.com/ozontech/seq-ui/actions/workflows/ci.yml/badge.svg)](https://github.com/ozontech/seq-ui/actions/workflows/ci.yml)
[![Code coverage](https://codecov.io/github/ozontech/seq-ui/coverage.svg?branch=main)](https://codecov.io/github/ozontech/seq-ui?branch=main)
[![Go version](https://img.shields.io/github/go-mod/go-version/ozontech/seq-ui)](https://github.com/ozontech/seq-ui)
[![GoReportCard example](https://goreportcard.com/badge/github.com/ozontech/seq-ui)](https://goreportcard.com/report/github.com/ozontech/seq-ui)
[![Go Report Card](https://goreportcard.com/badge/github.com/ozontech/seq-ui)](https://goreportcard.com/report/github.com/ozontech/seq-ui)
[![Telegram](https://telegram-badge.vercel.app/api/telegram-badge?channelId=@file_d_community)](https://t.me/file_d_community)

**seq-ui** is a UI backend for [seq-db](https://github.com/ozontech/seq-db).
Expand All @@ -23,7 +23,7 @@ Examples of config file can be found [here](/config).

## Contributing

`seq-ui` is an open-source project and contributions are very welcome! Please make sure to read our [contributing guide](/CONTRIBUTING.md) before creating an issue and opening a PR!
**seq-ui** is an open-source project and contributions are very welcome! Please make sure to read our [contributing guide](/CONTRIBUTING.md) before creating an issue and opening a PR!

## GitHub Registry

Expand Down
7 changes: 4 additions & 3 deletions docs/en/01-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

Welcome to the seq-ui quickstart guide! In just a few minutes, you'll learn how to:
- Quickly create a seq-ui instance
- Get [seq-db](https://github.com/ozontech/seq-db) indexed fields and search some events using `/seqapi`
- Get [seq-db](https://github.com/ozontech/seq-db) indexed fields
- Search events using `/seqapi`

## Running seq-ui

Before launch you need to create config file based on the [example config](https://github.com/ozontech/seq-ui/tree/main/config/config.example.yaml) or use it as-is.

seq-ui can be quickly launched in a docker container. Pull seq-ui image from Docker hub and create a container:
seq-ui can be quickly launched in a docker container. Pull seq-ui image from GitHub Container Registry (GHCR) and create a container:
```shell
docker run --rm \
--name seq-ui \
Expand Down Expand Up @@ -36,7 +37,7 @@ curl -X GET \

## Search for events

Search last 10 events with simple query that filters logs by `message` or `level` fields using `/seqapi/v1/search`:
Search last `10` events with simple query that filters logs by `message` or `level` fields using `/seqapi/v1/search`:
```shell
curl -X POST \
"http://localhost:5555/seqapi/v1/search" \
Expand Down
40 changes: 19 additions & 21 deletions docs/en/02-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> 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:
The configuration is set via a `yaml`-file and consists of three sections:
- [server](#server) - seq-ui server configutarion
- [clients](#clients) - seq-db clients configuration
- [handlers](#handlers) - seq-ui api handlers configuration
Expand Down Expand Up @@ -53,7 +53,7 @@ Host for debug server.

**`grpc_connection_timeout`** *`string`* *`default="0"`*

Sets 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 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)`.

Expand Down Expand Up @@ -109,7 +109,7 @@ HTTP server CORS config. If not set, no CORS settings will be applied.

+ **`options_passthrough`** *`bool`* *`default=false`*

Instructs preflight to let other potential next handlers to process the OPTIONS method. Turn this on if you handles OPTIONS.
Instructs preflight to let other potential next handlers to process the OPTIONS method. Turn this on if you handles `OPTIONS`.

### Auth

Expand All @@ -121,7 +121,7 @@ If set to non-empty string, JWT provider is created for API tokens verification.

**`oidc`** *`OIDC`* *`optional`*

Open ID Connnect config. If not set, no OIDC verification will be applied.
Open ID Connect config. If not set, no OIDC verification will be applied.

`OIDC` fields:

Expand Down Expand Up @@ -167,7 +167,6 @@ gRPC and HTTP server rate limiters configs. If not set, rate limiting will not b
> - `seqapi`, `userprofile`, `dashboards`, `massexport`, `errorgroups`
> - `SeqAPIService`, `UserProfileService`, `DashboardsService`, `MassExportService`, `ErrorGroupsService`


`ApiRateLimiters` fields:

+ **`default`** *`RateLimiter`* *`required`*
Expand Down Expand Up @@ -229,7 +228,9 @@ Cache config.

+ **`num_counters`** *`int`* *`default=1e7`*

The number of counters (keys) to keep that hold access frequency information. 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. If set to zero or negative value, then it will be reset to `default`.
The 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_cost`** *`int`* *`default=1e6`*

Expand All @@ -251,7 +252,7 @@ Cache config.

+ **`password`** *`string`* *`default=""`*

Password specified in the requirepass server 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.
Password specified in the `requirepass` server 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.

+ **`timeout`** *`string`* *`default="3s"`*

Expand All @@ -271,15 +272,15 @@ Cache config.

+ **`max_retry_backoff`** *`string`* *`default="512ms"`*

Maximum backoff between each retry (`512ms` by default). If set to `-1`, disables backoff.
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`*

Postgres database config.
PostgreSQL database config.

> Required for `/userprofile` and `seqapi/v1/async_search/` handlers.

Expand Down Expand Up @@ -385,16 +386,13 @@ Timeout for requests made by the client. A zero value means no timeout.

**`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.
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 is `4MB`.

**`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`.
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"`*

Expand All @@ -416,13 +414,13 @@ If gRPC keepalive params are not set, no keepalive params are applied to gRPC cl

+ **`time`** *`string`* *`default="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`, a minimum value of `10s` will be used instead.
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 to `default`.

> The value must be passed in the duration format: `<number>(ms|s|m|h)`.

+ **`timeout`** *`string`* *`default="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`, a minimum value of `1s` will be used instead.
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 to `default`.

> The value must be passed in the duration format: `<number>(ms|s|m|h)`.

Expand Down Expand Up @@ -453,7 +451,7 @@ Config for `/seqapi` API handlers.

+ **`max_search_total_limit`** *`int`* *`default=1e6`*

If search response returns number of events greater than `max_search_total_limit`, then the error will return.
If search request returns number of events greater than `max_search_total_limit`, then the error will return.

+ **`max_search_offset_limit`** *`int`* *`default=1e6`*

Expand Down Expand Up @@ -503,7 +501,7 @@ Config for `/seqapi` API handlers.

+ **`pinned_fields`** *`[]PinnedField`* *`default=[]`*

List of fields which will be pinned.
List of fields which will be pinned in UI.

`PinnedField` fields:

Expand All @@ -525,7 +523,7 @@ Config for `/errorgroups` API handlers.

+ **`log_tags_mapping`** *`LogTagsMapping`* *`optional`*

Mapping of clickhouse column names and `log_tags` keys.
Mapping of clickhouse column names and `log_tags` keys.

`LogTagsMapping` fields:

Expand All @@ -535,7 +533,7 @@ Config for `/errorgroups` API handlers.

+ **`query_filter`** *`map[string]string`* *`optional`*

Additional conditions to be added to clickhouse queries.
Additional conditions to be added to clickhouse queries.

### Mass export

Expand Down Expand Up @@ -569,7 +567,7 @@ Config for `/massexport` API handlers.

+ **`allowed_users`** *`[]string`* *`default=[]`*

List of users who can use mass export api. If it's empty then mass exports allowed for all users; display username is `anonymous`.
List of users who can use `/massexport` API.. If it's empty then mass exports allowed for all users; display username is `anonymous`.

+ **`file_store`** *`FileStore`* *`required`*

Expand Down
13 changes: 9 additions & 4 deletions docs/en/03-seq-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ curl -X GET \

Returns a list of events that satisfy the [search query](https://github.com/ozontech/seq-db/blob/main/docs/en/05-seq-ql.md).

> Allows obtain [aggregations](#aggregation) and a [histogram](#histogram) within a single query.
> Allows obtain [aggregations](#post-aggregation) and a [histogram](#post-histogram) within a single query.

**Auth:** YES

Expand All @@ -55,7 +55,7 @@ Returns a list of events that satisfy the [search query](https://github.com/ozon
- `to` (*string*, *required*): Timestamp of the end of search in `date-time` format.
- `histogram` (*object*, *optional*): Histogram query.
- `interval` (*string*, *required*): Histogram interval in `duration` format.
- `aggregations` (*[]object*, *optional*): List of aggregation queries (see [/aggregation](#aggregation) for details).
- `aggregations` (*[]object*, *optional*): List of aggregation queries (see [/aggregation](#post-aggregation) for details).
- `limit` (*int*, *required*): Search limit.
- `offset` (*int*, *optional*): Search offset.
- `withTotal` (*bool*, *optional*): If set, returns the total number of events found.
Expand All @@ -80,6 +80,7 @@ curl -X POST \
```

#### Response

```json
{
"events": [
Expand Down Expand Up @@ -136,6 +137,7 @@ curl -X GET \
```

#### Response

```json
{
"event": {
Expand Down Expand Up @@ -225,7 +227,7 @@ level,message

Calculates aggregations based on events that satisfy the search query.

> Aggregations can also be obtained using [/search](#search).
> Aggregations can also be obtained using [/search](#post-search).

**Auth:** YES

Expand Down Expand Up @@ -261,6 +263,7 @@ curl -X POST \
```

#### Response

```json
{
"aggregations": [
Expand Down Expand Up @@ -327,6 +330,7 @@ curl -X POST \
```

#### Response

```json
{
"aggregations": [
Expand Down Expand Up @@ -389,7 +393,7 @@ curl -X POST \

Calculates histogram based on events that satisfy the search query.

> Histogram can also be obtained using [/search](#search).
> Histogram can also be obtained using [/search](#post-search).

**Auth:** YES

Expand All @@ -416,6 +420,7 @@ curl -X POST \
```

#### Response

```json
{
"histogram": {
Expand Down
4 changes: 2 additions & 2 deletions docs/en/05-dashboards-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Creates dashboard.

**Request Body (application/json):**
- `name` (*string*, *required*): Dashboard name.
- `meta` (*string*, *required*): Dashboard metadata in `json`-format that is used in frontend.
- `meta` (*string*, *required*): Dashboard metadata in `json`-format that is used in frontend app.

#### Request

Expand Down Expand Up @@ -225,7 +225,7 @@ Updates a specific dashboard by their ID.

**Request Body (application/json):**
- `name` (*string*, *optional*): Dashboard name.
- `meta` (*string*, *optional*): Dashboard metadata in `json`-format that is used in frontend.
- `meta` (*string*, *optional*): Dashboard metadata in `json`-format that is used in frontend app.

#### Request

Expand Down
39 changes: 20 additions & 19 deletions docs/ru/01-quickstart.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Quickstart
# Быстрый запуск

Welcome to the seq-ui quickstart guide! In just a few minutes, you'll learn how to:
- Quickly create a seq-ui instance
- Get [seq-db](https://github.com/ozontech/seq-db) indexed fields and search some events using `/seqapi`
Добро пожаловать в руководство по быстрому запуску seq-ui! Всего через несколько минут вы узнаете, как:
- Быстро запустить seq-ui
- Получить список индексируемых полей [seq-db](https://github.com/ozontech/seq-db)
- Искать события (логи) используя `/seqapi`

## Running seq-ui
## Запуск seq-ui

Before launch you need to create config file based on the [example config](https://github.com/ozontech/seq-ui/tree/main/config/config.example.yaml) or use it as-is.
Перед запуском вам нужно создать файл конфигурации, взяв за основу [пример](https://github.com/ozontech/seq-ui/tree/main/config/config.example.yaml), или использовать его без изменений.

seq-ui can be quickly launched in a docker container. Pull seq-ui image from Docker hub and create a container:
seq-ui можно быстро запустить в docker-контейнере. Следующая команда скачает образ seq-ui из GitHub Container Registry (GHCR) и запустит контейнер:
```shell
docker run --rm \
--name seq-ui \
Expand All @@ -19,24 +20,24 @@ docker run --rm \
-it ghcr.io/ozontech/seq-ui:latest --config=config.yaml
```

## Running seq-ui with seq-db
## Запуск seq-ui вместе с seq-db

Before next steps, we need to setup seq-db. See [seq-db quickstart](https://github.com/ozontech/seq-db/blob/main/docs/en/01-quickstart.md) for details.
Перед тем как перейти к следующим шагам, необходимо запустить seq-db. Обратитесь к [Быстрому запуску seq-db](https://github.com/ozontech/seq-db/blob/main/docs/ru/01-quickstart.md) за детальной информацией.

## Get seq-db indexed fields
## Список индексируемых полей seq-db

seq-db doesn't index any fields from the ingested data by default. Instead, indexing is controlled through a special file called the mapping file. See [index types](https://github.com/ozontech/seq-db/blob/main/docs/en/03-index-types.md) for details.
По умолчанию, seq-db не индексирует поля из записываемых данных, вместо этого есть специальный файл маппинга, в котором указаны индексируемые поля и используемые типы индексов. Для более детальной информации смотрите [Типы индексов](https://github.com/ozontech/seq-db/blob/main/docs/ru/03-index-types.md).

The fields can be obtained using `/seqapi/v1/fields`:
Спиоск полей может быть получен, используя `/seqapi/v1/fields`:
```shell
curl -X GET \
"http://localhost:5555/seqapi/v1/fields" \
-H "accept: application/json"
```

## Search for events
## Поиск событий

Search last 10 events with simple query that filters logs by `message` or `level` fields using `/seqapi/v1/search`:
Выполним поиск последних `10` событий с простым поисковым запросом, фильтрующим события по полю `message` или `level`, используя `/seqapi/v1/search`:
```shell
curl -X POST \
"http://localhost:5555/seqapi/v1/search" \
Expand All @@ -52,9 +53,9 @@ curl -X POST \
}'
```

## What's next
## Что дальше

seq-ui offers many more useful features for working with logs and users:
- [Seq API](./03-seq-api.md) provides access to logs, aggregations and histogram
- [UserProfile API](./04-userprofile-api.md) provides the ability to manage users and their data
- [Dashboards API](./05-dashboards-api.md) provides the ability to combine a search query, aggregations and a histogram in a dashboard and save it to DB
seq-ui имеет множество других функций для работы с логами и пользователями:
- [Seq API](./03-seq-api.md) предоставляет доступ к логам, агрегациям и гистограмме
- [UserProfile API](./04-userprofile-api.md) предоставляет возможность управлять пользователями и их данными
- [Dashboards API](./05-dashboards-api.md) предоставляет возможность объединять поисковый запрос, аггрегации и гистограмму в дашборд, сохраняя его в базе данных
Loading