clickhouse-docs icon indicating copy to clipboard operation
clickhouse-docs copied to clipboard

Grafana: incorrect config options for default log columns

Open willholley opened this issue 1 year ago • 0 comments

The documentation at https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/en/integrations/data-visualization/grafana/config.md suggests the following to configure the log columns:

jsonData:
  logs:
    defaultDatabase: default # default log database.
    defaultTable: otel_logs  # default log table. If you're using OTel, this should be set to "otel_logs".

    otelEnabled: false  # set to true if OTel is enabled.
    otelVersion: latest # the otel collector schema version to be used. Versions are displayed in the UI, but "latest" will use latest available version in the plugin.

    # Default columns to be selected when opening a new log query. Will be ignored if OTel is enabled.
    timeColumn:       <string> # the primary time column for the log.
    logLevelColumn:   <string> # the log level/severity of the log. Values typically look like "INFO", "error", or "Debug".
    logMessageColumn: <string> # the log's message/content.

However, logLevelColumn and logMessageColumn do not match the code at https://github.com/grafana/clickhouse-datasource/blob/main/src/types/config.ts#L66.

Instead, these should be:

    # Default columns to be selected when opening a new log query. Will be ignored if OTel is enabled.
    timeColumn:       <string> # the primary time column for the log.
    levelColumn:   <string> # the log level/severity of the log. Values typically look like "INFO", "error", or "Debug".
    messageColumn: <string> # the log's message/content.

willholley avatar May 24 '24 12:05 willholley