Skip to main content

Configuration

Coroot can be configured using command-line arguments, environment variables, and a configuration file.

Configuration values are evaluated in the following precedence, with items higher on the list taking priority:

  1. Command-line arguments
  2. Environment variables
  3. Configuration file parameters
info

Certain configuration values can only be set through command-line flags, while others are available only via configuration file. For instance, the projects parameter (a list of predefined projects) can only be configured via configuration file.

Command-line flags

ArgumentEnvironment VariableDefault ValueDescription
--configCONFIG0.0.0.0:8080Configuration file.
--listenLISTEN0.0.0.0:8080Listen address in the format ip:port or :port.
--url-base-pathURL_BASE_PATH/Base URL to run Coroot at a sub-path, e.g., /coroot/.
--data-dirDATA_DIR/dataPath to the data directory.
--cache-ttlCACHE_TTL30dMetric Cache Time-To-Live (TTL).
--cache-gc-intervalCACHE_GC_INTERVAL10mMetric Cache Garbage Collection (GC) interval.
--traces-ttlTRACES_TTL7dTraces Time-To-Live (TTL).
--logs-ttlLOGS_TTL7dLogs Time-To-Live (TTL).
--profiles-ttlPROFILES_TTL7dProfiles Time-To-Live (TTL).
--pg-connection-stringPG_CONNECTION_STRINGPostgreSQL connection string (uses SQLite if not set).
--disable-usage-statisticsDISABLE_USAGE_STATISTICSfalseDisable usage statistics.
--read-onlyREAD_ONLYfalseEnable read-only mode where configuration changes don't take effect.
--do-not-check-sloDO_NOT_CHECK_SLOfalseDo not check Service Level Objective (SLO) compliance.
--do-not-check-for-deploymentsDO_NOT_CHECK_FOR_DEPLOYMENTSfalseDo not check for new deployments.
--do-not-check-for-updatesDO_NOT_CHECK_FOR_UPDATESfalseDo not check for new versions.
--auth-anonymous-roleAUTH_ANONYMOUS_ROLEDisable authentication and assign one of the following roles to the anonymous user: Admin, Editor, or Viewer.
--auth-bootstrap-admin-passwordAUTH_BOOTSTRAP_ADMIN_PASSWORDPassword for the default Admin user.
--license-keyLICENSE_KEYLicense key for Coroot Enterprise Edition.
--global-clickhouse-addressGLOBAL_CLICKHOUSE_ADDRESSThe address of the ClickHouse server to be used for all projects.
--global-clickhouse-userGLOBAL_CLICKHOUSE_USERThe username for the ClickHouse server to be used for all projects.
--global-clickhouse-passwordGLOBAL_CLICKHOUSE_PASSWORDThe password for the ClickHouse server to be used for all projects.
--global-clickhouse-initial-databaseGLOBAL_CLICKHOUSE_INITIAL_DATABASEThe initial database on the ClickHouse server to be used for all projects. Coroot will automatically create and manage a dedicated database for each project within the server.
--global-clickhouse-tls-enabledGLOBAL_CLICKHOUSE_TLS_ENABLEDfalseWhether TLS is enabled for the ClickHouse server connection (true or false).
--global-clickhouse-tls-skip-verifyGLOBAL_CLICKHOUSE_TLS_SKIP_VERIFYfalseWhether to skip verification of the ClickHouse server's TLS certificate (true or false).
--global-prometheus-urlGLOBAL_PROMETHEUS_URLThe URL of the Prometheus server to be used for all projects.
--global-prometheus-tls-skip-verifyGLOBAL_PROMETHEUS_TLS_SKIP_VERIFYfalseWhether to skip verification of the Prometheus server's TLS certificate (true or false).
--global-refresh-intervalGLOBAL_REFRESH_INTERVAL15sThe interval for refreshing Prometheus data.
--global-prometheus-userGLOBAL_PROMETHEUS_USERThe username for the Prometheus server to be used for all projects.
--global-prometheus-passwordGLOBAL_PROMETHEUS_PASSWORDThe password for the Prometheus server to be used for all projects.
--global-prometheus-custom-headersGLOBAL_PROMETHEUS_CUSTOM_HEADERSCustom headers to include in requests to the Prometheus server.
--global-prometheus-remote-write-urlGLOBAL_PROMETHEUS_REMOTE_WRITE_URLThe URL for metric ingestion though the Prometheus Remote Write protocol.

Configuration file

Use the --config flag to specify the configuration file to load. The file must be in YAML format.

listen_address: 0.0.0.0:8080 # Listen address in the format `ip:port` or `:port`. 
url_base_path: / # Base URL to run Coroot at a sub-path, e.g., `/coroot/`.
data_dir: /data # Path to the data directory.

cache:
ttl: 30d # Metric Cache Time-To-Live (TTL).
gc_interval: 10m # Metric Cache Garbage Collection (GC) interval.

# Coroot stores Traces, Logs, and Profiles in ClickHouse.
# Their retention is managed by setting a Time-To-Live (TTL) for the corresponding Clickhouse tables.
# The TTLs below are applied during table creation and do not currently affect existing tables.
traces:
ttl: 7d
logs:
ttl: 7d
profiles:
ttl: 7d

postgres: # Store configuration in a Postgres DB instead of SQLite
# URI form: "postgres://coroot:password@127.0.0.1:5432/coroot?sslmode=disable"
# KV form: "host=127.0.0.1 user=coroot password=password port=5432 dbname=coroot ssl_mode=disable"
# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
connection_string:

global_prometheus: # The Prometheus server to be used for all projects.
url: # http(s)://IP:Port/ or http(s)://Domain:Port/
refresh_interval: 15s # The interval for refreshing Prometheus data.
tls_skip_verify: false # Whether to skip verification of the Prometheus server's TLS certificate.
user: # The basic-auth username.
password: # The basic-auth password.
custom_headers: # Custom headers to include in requests to the Prometheus server.
# header_name: header_value
remote_write_url: # The URL for metric ingestion though the Prometheus Remote Write protocol.

global_clickhouse: # The ClickHouse server to be used for all projects.
address: # IP:Port or Domain:Port.
user: # The username for the ClickHouse server.
password: # The password for the ClickHouse server.
database: # The initial database on the ClickHouse server.
tls_enable: false # Whether TLS is enabled for the ClickHouse server connection.
tls_skip_verify: false # Whether to skip verification of the ClickHouse server's TLS certificate.

auth:
anonymous_role: # Disables authentication if set (one of Admin, Editor, or Viewer).
bootstrap_admin_password: # Password for the default Admin user.

do_not_check_slo: false # Do not check Service Level Objective (SLO) compliance.
do_not_check_for_deployments: false # Do not check for new deployments.
do_not_check_for_updates: false # Do not check for new versions.
disable_usage_statistics: false # Disable anonymous usage statistics.

license_key: # License key for Coroot Enterprise Edition.

# The project defined here will be created if it does not exist
# and will be configured with the provided API keys.
# If a project with the same name already exists (e.g., configured via the UI),
# its API keys will be replaced.
projects: # Create or update projects (configuration file only).
- name: # Project name (e.g., production, staging; must be unique; required).
api_keys: # Project API keys, used by agents to send telemetry data (required).
- key: # Random string or UUID (must be unique; required).
description: # The API key description (optional).
Looking for 24/7 support from the Coroot team? Subscribe to Coroot Enterprise:Start free trial