Configuration setup and activation of features

How to enable and disable features

There are two ways to manage DataLens configuration:

  • Flags for init.sh: For example, --export and --files. This is convenient for quick tests or one-time runs.

  • The values.yaml file: Declarative approach for production use. The entire configuration is stored in one place for easy versioning and reuse. values.yaml takes priority over parameters from init.sh arguments.

Tip

Always use a custom values.yaml to manage the configuration of a production environment. This way, the init.sh flags will be ignored, making the values.yaml file the single point of truth.

Key features overview

All features are enabled in the values.yaml file under features.

Look at the structure of values.yaml to learn how to enable key features. All of them are enabled in the features section.

# ... (start of file: registry, ingress, infra, application, secrets, etc.)
#
# Section that controls connector visibility in the interface
#
visible_connectors:
  - clickhouse
  - postgres
  - chyt
  - ydb
  - mysql
  - greenplum
  - mssql
  - oracle
  - trino
#
# KEY SECTION FOR MANAGING FEATURES
#
features:
  auth:
    enabled: true
    local: true
  meta_manager:
    enabled: false
  ui_api:
    enabled: false
  demo:
    enabled: true        # <-- To disable demo dashboards, set to false
  hc:
    enabled: true
    endpoint: ''
    protocol: ''
  yandex_map:
    enabled: false       # <-- To enable Yandex Maps, set to true and specify the token
    token: ''
  editor:
    enabled: false       # <-- To enable Chart Editor, set to true
  export:
    enabled: false       # <-- To enable workbook export/import, set to true
                         #     This will deploy additional services: temporal, meta_manager, and ui_api
  compeng_sidecar:
    enabled: false
  usage_tracking:
    enabled: false       # <-- To enable usage statistics collection, set to true
                         #     This will require a functioning ClickHouse database
  files:
    enabled: false       # <-- To enable file connectors, set to true
                         #     This will require functioning ClickHouse, Valkey, and S3

# ... (end of file: config, checksum)

Exporting and importing workbooks

Use this feature to migrate objects, e.g., workbooks, dashboards, and charts, between different DataLens installations. It provides a convenient way to move objects between instances and is also used in CI/CD workflows.

features:
  export:
    enabled: true

Note

Enabling export/import automatically deploys additional services: meta-manager, ui-api, and temporal. This will increase resource consumption.

File connectors

This feature enables users to upload CSV and XLS files to create datasets.

features:
  files:
    enabled: true

Note

To use this feature, you also need ClickHouse to store file data, Valkey to store cache, and S3 for file storage. If you have set up external services, the distribution will deploy the built-in ones (MinIO as S3).

Enabling a file connector automatically deploys these additional services: file-uploader, file-worker, and file-secure-reader. This will increase resource consumption.

Chart Editor

Enables you to create custom visualizations using JavaScript, HTML, and D3.js library.

features:
  editor:
    enabled: true

Usage tracking

This feature allows you to collect user activity events, e.g., viewing dashboards or running queries, and log them to ClickHouse. This way, you can monitor DataLens usage.

features:
  usage_tracking:
    enabled: true

Configuration specifics when using external ClickHouse and S3

We recommend using external infrastructure tools for production workloads. Here, we demonstrate how to configure the integration using ClickHouse:

  1. Disable the embedded service in values.yaml:
infra:
  clickhouse:
    enabled: false
  1. Specify the external service connection settings:
clickhouse:
  CLICKHOUSE_HOST: 'your-ch.db.internal'
  CLICKHOUSE_PORT: '9440' # It is often used for TLS connections
  CLICKHOUSE_USER: 'datalens-user'
  # The password is set under `secrets` in the `values.yaml` file

#...
secrets:
  CLICKHOUSE_PASSWORD: '12345678'

Follow the same steps to set up the S3 storage. You need to disable infra.s3.enabled: false and specify the S3 endpoint and credentials, e.g., for Yandex Object Storage.

Note

To implement a partial override, specify the --values-merge flag along with the --values parameter.

To enable or disable a feature, simply replace enabled: false with enabled: true. After saving the file, you will only need to apply it by running the ./init.sh --values <your_file_name>.yaml command.

Monitoring and debugging tools

Monitoring with Prometheus

DataLens supports integration with Prometheus for monitoring. To implement it, you need to configure Prometheus to collect metrics from DataLens pods. You can do this using service annotations to enable Prometheus to automatically detect targets for metric scraping, i.e., automatic collection of system, application, or service performance data using a specialized tool or program.

Debugging with Freelens

Freelens is a graphical client for Kubernetes. This feature allows you to:

  • View pod status.
  • View logs for each pod in real time.
  • Monitor CPU and RAM usage.
  • Connect to the pod command line to run diagnostic commands.

Debugging with k9s

This is a built-in Freelens equivalent you can use right from the terminal.

Here is how you start it:

./init.sh --k9s

Use case

You have enabled file connectors (features.files.enabled: true) without setting up external services. Which three embedded infrastructure components will be automatically deployed if not yet enabled?

  • PostgreSQL, Kubernetes, nginx
  • ClickHouse, Valkey, S3 (MinIO)
  • temporal, meta-manager, ui-api
  • Prometheus, Grafana, Alertmanager
Find out the answer
  • PostgreSQL, Kubernetes, Nginx

    Wrong. PostgreSQL is required, but Kubernetes and nginx (Ingress) comprise the runtime environment and are not the feature components.

  • ClickHouse, Valkey, S3 (MinIO)

    Correct! ClickHouse is used to store data from files, S3 (MinIO in the distribution), to store the actual files, and Valkey, for caching.

  • temporal, meta-manager, ui-api

    Wrong. These services are deployed when you enable the export/import feature.

  • Prometheus, Grafana, Alertmanager

    Wrong. These are monitoring system components which are not part of the DataLens distribution and which you need to configure separately.

Hands-on task: Enabling the export feature

Modify the prod-config.yaml file from the article titled Installation for production use to enable the export feature.

  1. In the distribution directory, open the prod-config.yaml file or create its copy.

  2. Find the features section. Inside it, find the export section.

  3. Set enabled to true.

# ...
features:
  # ...
  export:
    enabled: true
  # ...

If you apply the file using ./init.sh --values prod-config.yaml, Helm will detect the changes and install the missing services: temporal, meta-manager, and ui-api. You will see this in the command output.

Summary

Now you know how to manage DataLens features using values.yaml. You can enable export, work with files, and understand the associated dependencies.