Skip to content

Logchef vs Grafana for ClickHouse and VictoriaLogs logs

“Why not use Grafana with the ClickHouse data source plugin?” is a fair question, and for many teams Grafana is the right answer. Grafana reads logs from ClickHouse and VictoriaLogs through two maintained plugins, next to your metrics and traces. Logchef is a narrower tool: a log workspace over the same tables, with a short search language, a field sidebar, and per-team access to sources in the open source release.

Logs in Loki get the same answer. Grafana includes a built-in Loki data source, and Logchef reads the same Loki as a source. See Logchef vs Grafana Loki.

Pick Grafana if it already holds your metrics and traces, and the people who read logs are comfortable in SQL or LogsQL. You get logs beside every other signal, a larger panel library, and more alert contact point types.

Pick Logchef if people who do not write SQL search logs every day, if different teams must see different log sources, or if you want the same queries in a browser, a terminal, and an AI assistant. Logchef covers logs only. It has no metrics store, traces UI, or APM, and it does not ingest logs.

Neither tool stores logs. Both read the ClickHouse tables, VictoriaLogs instance, or Loki you already run, so you can run both at once.

This page was checked on 2026-11-18 against the linked Grafana and plugin documentation and the Logchef repository.

Logchef Grafana with the two plugins
What it is A log workspace for ClickHouse, VictoriaLogs, and Loki: explorer, dashboards, alerts, access control A general observability and visualization platform. ClickHouse and VictoriaLogs are two of its data sources
License AGPLv3 Grafana is AGPLv3. The ClickHouse plugin (Grafana Labs) and the VictoriaLogs plugin (VictoriaMetrics) are Apache 2.0
Storage None of its own. It reads your ClickHouse tables, VictoriaLogs instances, and Loki tenants None of its own. It reads the same backends
Ingestion None. Your collectors write to the backend None. Your collectors write to the backend
Query languages LogchefQL, ClickHouse SQL, LogsQL, LogQL ClickHouse SQL in a SQL editor or a visual query builder. LogsQL in a code editor or a builder
Signals Logs Logs, metrics, and traces from the ClickHouse plugin, plus every other Grafana data source
Deployment One binary with SQLite, or Postgres for several replicas A Grafana server plus the two plugins
Access control OIDC or local login. Teams scope which sources a user can query. An audit log for admins Any user in an org can query that org’s data sources. Per-data-source permissions are in Grafana Enterprise and Grafana Cloud
Alerting Scheduled rules with email, webhook, Slack, and PagerDuty destinations Grafana Alerting: alert rules and recording rules over data source queries, with contact points such as Slack, PagerDuty, Opsgenie, email, and webhook
Dashboards Time series, stat, breakdown, and table panels over log sources, with scheduled email reports Grafana’s full panel library, template variables, and annotations, across all data sources
Live tail All three backends. It polls ClickHouse and Loki and streams VictoriaLogs The VictoriaLogs plugin shows live-streaming logs. The ClickHouse plugin’s manifest does not declare streaming
AI and MCP A built-in AI query assistant and a built-in read-only MCP endpoint A separate MCP server (Apache 2.0). Its SQL tools, which cover ClickHouse, are off by default
Pricing Free and self-hosted Grafana OSS is free and self-hosted. Grafana Enterprise and Grafana Cloud are commercial

Sources for the Grafana column: the ClickHouse data source docs, the VictoriaLogs data source docs, data source management, contact points, and each plugin’s plugin.json (ClickHouse, VictoriaLogs). The table does not cover Grafana’s Loki data source.

In Grafana you query ClickHouse with a visual builder or a SQL editor. The query editor docs say a SQL query for the Logs panel must return a time column and one or more string columns, and they recommend the aliases timestamp, body, and level. Time ranges come from macros such as $__timeFilter.

In Logchef the everyday query is a LogchefQL filter:

level="error" and service="payments" and message~"timeout"

The same text compiles to SQL on a ClickHouse source, to LogsQL on a VictoriaLogs source, and to LogQL on a Loki source. An aggregation pipe such as | count() by service covers counts, sums, and percentiles on ClickHouse and VictoriaLogs. For joins, CTEs, LogsQL pipes, and LogQL metric queries you switch the editor to native mode. The same LogchefQL filter also works in an alert condition, a dashboard panel, the CLI, and the MCP endpoint.

If your team writes ClickHouse SQL without friction, this difference is small. If people must search logs without learning your table schema, it is the main reason to add Logchef.

Logchef’s field sidebar lists the fields of the current source with their top values and counts. A click adds a filter and Alt-click excludes a value. The values follow the selected time range and the active query.

Grafana is closer on VictoriaLogs than on ClickHouse. The VictoriaLogs plugin has a Drilldown view (since v0.33.0) that breaks logs down by field values, stream fields, and message patterns without LogsQL. The ClickHouse plugin offers column filters in the query builder and ad hoc filters.

Per Grafana’s data source management docs, any user in an organization can query that organization’s data sources. A Viewer can run any query against a data source, not only the queries on dashboards they can open. Restricting a data source to named users or teams needs data source permissions, which are available in Grafana Enterprise and Grafana Cloud. The ClickHouse plugin’s configuration docs add that Grafana “does not validate or restrict SQL” and recommend a read-only ClickHouse user.

In Logchef, teams own access. Each source is assigned to teams, and users see only the sources of their teams. This model is part of the open source release. A VictoriaLogs source can also carry an immutable scope filter that Logchef applies to every request. Logchef parses raw SQL and rejects anything that is not a single SELECT statement. Use a read-only database user with both tools.

Logchef’s opt-in windowed search splits the selected range into windows and searches the newest first. Rows arrive as each window completes, Load older continues the same search, and a slow window can be skipped and retried.

The VictoriaLogs plugin loads the histogram incrementally, with pause, resume, and stop controls, and limits each query to 1,000 lines by default and 10,000 at most.

Saved queries, the terminal, and AI assistants

Section titled “Saved queries, the terminal, and AI assistants”

Logchef’s collections are shared lists of saved queries with owner, editor, and member roles. A collection never grants access to the logs behind a query. Saved views keep a named column layout, filter, and time range for a source. Grafana has saved queries too. The v13.2 release notes list them as generally available in Grafana Enterprise and Grafana Cloud.

The Logchef CLI runs LogchefQL, SQL, LogsQL, and LogQL from a terminal. The MCP endpoint is part of the server. An assistant signs in with OAuth, acts as you, and can only read the sources of your teams.

Both tools read the same backend, so adding one does not disturb the other. One way to split the work:

  • Grafana holds metrics, traces, and the wall dashboards that mix signals.
  • Logchef handles log search during an incident, saved queries, and log alerts.
  • Grafana monitors Logchef. Logchef exposes Prometheus metrics, and the repository ships a Grafana dashboard for them in dashboards/.
  • You already run Grafana for metrics and traces and want logs beside them. The VictoriaLogs plugin supports trace-to-logs links from Tempo, Jaeger, and Zipkin, and the ClickHouse plugin has a Traces query type. Logchef has no traces UI.
  • You need dashboards that mix logs with Prometheus metrics or other data sources. Logchef panels read only ClickHouse, VictoriaLogs, and Loki log sources.
  • You need built-in contact points such as Opsgenie. Logchef has email, webhook, Slack, and PagerDuty destinations.
  • You want a hosted service. Grafana Cloud runs Grafana for you. Logchef is self-hosted only.
  • Your team is fluent in SQL and LogsQL.
  • People outside the platform team search logs daily, and you do not want them to learn the table schema first.
  • Teams must see different sources, and you run open source software only.
  • You use more than one of ClickHouse, VictoriaLogs, and Loki and want one filter syntax for all of them.
  • You want log queries from a terminal or an AI assistant under the same access rules as the web UI.
  • You want one binary to deploy, with teams and sources managed from a TOML file.

No data moves, because both tools read the same tables. Follow the quickstart and add your ClickHouse table, VictoriaLogs URL, or Loki URL as a source. A ClickHouse source needs a timestamp column and no other schema.

To reuse a Grafana SQL panel, paste the query into SQL mode and replace $__timeFilter(column) with Logchef’s {{__time_filter}} time macro. LogQL from a Grafana panel runs in the LogQL tab once Grafana variables such as $__interval become Logchef’s macros. If you are leaving Loki, read Migrate from Loki.

Only for logs stored in ClickHouse, VictoriaLogs, or Loki. Logchef does not replace Grafana for metrics, traces, or dashboards over other data sources.

Can Grafana and Logchef use the same ClickHouse tables?

Section titled “Can Grafana and Logchef use the same ClickHouse tables?”

Yes. Both only read. Give each tool its own read-only database user.

Does the Grafana ClickHouse plugin support logs?

Section titled “Does the Grafana ClickHouse plugin support logs?”

Yes. It has a Logs query type, a query builder with an OpenTelemetry preset, a log volume histogram in Explore, and alerting on ClickHouse queries.

Can Grafana OSS limit which teams query a data source?

Section titled “Can Grafana OSS limit which teams query a data source?”

Not per data source. Grafana’s docs list data source permissions as a Grafana Enterprise and Grafana Cloud feature.

Loki, yes: add Loki 3.0 or later as a source and query it with LogQL. See Logchef vs Grafana Loki. Prometheus, no.

To try Logchef next to your Grafana, start with the quickstart.