Skip to main content

Log Search

Use Discover in Grafana Doris App to search logs stored in your VeloDB Cloud warehouse. Select a table and time range, then filter results with SQL predicates or the plugin's supported Lucene-style syntax.

Before you start, complete Quick Start or connect your own Grafana instance. The Grafana data source needs read access to the log table. For log-to-trace links, also configure the trace table and ingest logs with a populated trace_id that matches stored traces.

Key capabilities:

  • Use SQL predicates or supported Lucene-style search expressions.
  • Follow a log record's trace ID to investigate its request.
  • Select a time range and filters interactively.
  • Inspect results in table or JSON form.
  • View records around a selected event for context.
  • Inspect the most frequent field values and their proportions.

Discover page overview​

Discover page overview

The Discover page consists of four core areas:

Query input area​

Configures the query scope and search statement. Capabilities include:

  • Choose a data source
  • Choose the time field and time range
  • Enter search conditions in either SQL or Lucene syntax

Time trend area​

A histogram showing the time-based distribution of query results. Capabilities include:

  • Quickly observe how matching data trends over time
  • Drag-select a time window to change the query's time range

Detail data area​

Shows detailed records of query results with contextual exploration. Capabilities include:

  • Show the most recent matching records. If a trace_id is present and trace correlation is configured, open the trace details.
  • Expand a single log to view all fields in either table or JSON form
  • Interactively build filter conditions from the table form
  • View surrounding data for a record

Field browser area​

Shows fields of the selected table for exploration.

Capabilities include:

  • Choose which fields to display on the right. By default, _source shows a concatenation of all fields.
  • Hover over a field to see its Top 5 most frequent values and percentages
  • Click "+" or "-" on a value to build filter conditions interactively, which are synced to the top query bar

Query input​

In the query input area, use the dropdown menus to select data source, database, table, time field, and time range. Configure default data source, database, and table selections in Doris App. Choose the timestamp column that represents the event time you want to investigate.

Query input demo

The search input supports SQL predicates and a subset of Lucene-style expressions. The plugin translates the latter into SQL WHERE conditions. This is not a complete Lucene query parser, so validate complex expressions with the installed plugin version. The examples below show the intent of common expressions.

SearchLucene-style expressionEquivalent SQL predicate
Keyword in one fieldservice_name:kafkaservice_name MATCH_ANY 'kafka'
Keyword across configured searchable fieldserror(service_name MATCH_ANY 'error') OR (scope_name MATCH_ANY 'error') for two illustrative fields
Phrase in one fieldbody:"connection failed"body MATCH_PHRASE 'connection failed'
Phrase across configured searchable fields"connection failed"(body MATCH_PHRASE 'connection failed') OR (scope_name MATCH_PHRASE 'connection failed') for two illustrative fields
Prefixservice_name:kaf*service_name MATCH_PHRASE_PREFIX 'kaf'
Inclusive numeric rangeduration:[100 TO 500]duration BETWEEN 100 AND 500
Comparisonduration:>500duration > 500
Exclusive numeric rangeduration:{100 TO 200}duration > 100 AND duration < 200
ANDservice_name:kafka AND status:failed(service_name MATCH_ANY 'kafka') AND (status MATCH_ANY 'failed')
ORservice_name:kafka OR service_name:zookeeper(service_name MATCH_ANY 'kafka') OR (service_name MATCH_ANY 'zookeeper')
NOTNOT service_name:kafkaNOT (service_name MATCH_ANY 'kafka')
Grouping(service_name:kafka OR service_name:zookeeper) AND status:failed((service_name MATCH_ANY 'kafka') OR (service_name MATCH_ANY 'zookeeper')) AND (status MATCH_ANY 'failed')

Field names must exist in your selected table. status and duration above are illustrative fields, not guaranteed columns in otel_logs. Range values use the field's stored units. Cross-field searches use the fields selected by the plugin and table configuration, not every field in the table.

Key points of the Lucene syntax:

  1. The basic form is field_name:match_condition.
  2. field_name: matches a single field against match_condition. Without field_name:, the plugin searches its configured searchable fields with an OR condition.
  3. For text values, match_condition has three forms:
    1. A double-quoted condition requests a phrase match. Phrase behavior depends on the field's text analysis and index configuration.
    2. An unquoted text condition requests a keyword match.
    3. A trailing * requests prefix matching, as in service_name:kaf*. Do not assume that every Lucene wildcard form is supported.
  4. For numeric and date values, match_condition has three forms:
    1. A single value denotes equality.
    2. >, < denote range, similar to SQL.
    3. Brackets denote intervals, square brackets for closed and curly braces for open.
  5. Multiple conditions can be combined with AND / OR / NOT, similar to SQL. Parentheses adjust grouping precedence.

Key points of the SQL syntax:

  1. MATCH and MATCH_ANY correspond to Lucene keyword match, any one of the keywords matches (OR relation).
  2. MATCH_ALL is also keyword match, but every keyword must match (AND relation).
  3. MATCH_PHRASE requests phrase matching with the field's configured text analysis.
  4. Equality and range queries use the standard =, >, <, BETWEEN.
  5. Multiple conditions can be combined with AND / OR / NOT, with parentheses adjusting precedence.

Time-trend data​

The time trend shows the count of matching records in time buckets:

  1. Hover over a bar to see the start time of the time bucket and the count of matching data within it.
  2. Drag-select on the trend chart to change the query's time range.
  3. The bucket length defaults to Auto, scaled to the overall time range. You can also pick a different granularity such as second, minute, or hour from the dropdown.

Time-trend demo

Detail data​

The detail area displays records matching the selected time range and query.

  1. Records appear in descending time order, with pagination for additional results. The default columns are the selected time field and _source, a virtual concatenation of the record fields as key: value pairs. Click + next to a field in the field browser to add it to the results. Click x beside a displayed field to remove it. Removing all selected fields restores the default _source view.

Detail data demo

  1. Expand a record to view its details as Table or JSON. In table form, click + or - next to a field value to add filter conditions such as severity_text = 'INFO'.

Expand record demo

  1. After expanding a record, click Surrounding items to inspect nearby records in time. This context view relaxes the original search predicates. Add a host or service filter to restrict the results, or load more records to expand the context.

View context demo

  1. If a record has a trace_id field, the plugin can display it as a link to a trace waterfall. The trace must exist in the configured trace table for correlation to succeed.

Log-to-trace demo

Field browser​

The field browser on the left lets you inspect the fields of the current table and analyze their value distribution.

  1. Click "+" on the right of a field to add it to the detail data table.
  2. Click a field name to see its Top 5 most frequent values, and click "+" / "-" next to a value to dynamically add filter conditions.

Field browser demo

Common errors​

SymptomCheck and resolution
No matching recordsWiden the time range, confirm the selected time field and timezone, and verify that ingestion populated the selected table.
A keyword or phrase behaves unexpectedlyCheck the column's text parser and index configuration. Use an explicit field and a SQL predicate to isolate the condition.
A Lucene-style expression failsSimplify the expression or use SQL mode. The plugin implements a subset of Lucene syntax.
A trace link opens without dataConfirm that the log has a valid trace_id, the configured trace table contains that trace, and Grafana can read it.
Surrounding records include other servicesContext queries relax the original predicates. Add a service or host filter in the context view.

See also​

Enter to send · Shift+Enter for a new line