ClickHouse is connected through Grafana. There’s no direct ClickHouse connection, though
self-hosted clusters can be connected as a PostgreSQL source instead.
What we support
A ClickHouse data source in Grafana is discovered as a telemetry data source in Nexus, with up to three sub-sources:
Logs and traces are read from whichever table your Grafana data source names, and renamed metric tables are still found.
Metrics covers gauges, counters, and explicit-bucket histograms. Exponential histograms and summaries aren’t supported.
Connecting ClickHouse
Connect Grafana with a ClickHouse data source behind it. Queries run through Grafana using its own credentials, so there’s nothing separate to connect or rotate, and your cluster only needs to be reachable from Grafana. If your Grafana sits inside your network, connect it through a proxy. Which signals appear depends on that data source. Logs and traces are defined by the Grafana ClickHouse plugin config, while metrics appear if the exporter’s metric tables are in the connection’s database.The user Nexus queries as
Nexus queries as the ClickHouse user configured on the Grafana data source, so give it a read-only one. The cleanest setup is a second ClickHouse data source in Grafana pointed at a dedicated user, leaving your existing one untouched:SELECT on your telemetry database and on the system tables above, and nothing else. Leave out the source privileges (URL, S3, FILE, REMOTE), which Nexus never needs.
Use readonly = 2 rather than readonly = 1. Both refuse writes, but readonly = 1 also blocks the limits Nexus puts on each query to cap how much of your cluster a single read can touch.
Connecting direct
ClickHouse can speak the PostgreSQL wire protocol, so a self-hosted cluster can be connected as a PostgreSQL data source instead. Enable ClickHouse’s PostgreSQL interface, then connect it with its host and credentials as you would any Postgres database. This gives you read-only SQL rather than the three signal data sources above. ClickHouse Cloud doesn’t expose the interface, so it’s for self-hosted clusters only.Related
Grafana
The provider ClickHouse is connected through.
How telemetry works
How Nexus queries your telemetry.
ClickStack alerts
Page the right people when a ClickStack alert fires.