signoz-writing-clickhouse-queries

Generate raw ClickHouse SQL for SigNoz dashboard panels on logs and traces.

14|10|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/SigNoz/agent-skills --skill signoz-writing-clickhouse-queries
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: signoz-writing-clickhouse-queries
Source: https://github.com/SigNoz/agent-skills/tree/main/plugins/signoz/skills/signoz-writing-clickhouse-queries
Command: npx skills add https://github.com/SigNoz/agent-skills --skill signoz-writing-clickhouse-queries

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing advanced ClickHouse SQL for SigNoz dashboards when the built-in builder cannot express complex joins, window functions, or body/text extractions on logs and traces.

Core Features & Use Cases

  • Generate raw ClickHouse queries for log and trace panels that require custom SQL
  • Support timeseries, value, and table widgets in dashboard panels
  • Use cases include ad-hoc data exploration and specialized panel queries that the builder cannot articulate

Quick Start

Generate a ClickHouse query for a dashboard panel using logs or traces.

Frequently Asked Questions about signoz-writing-clickhouse-queries

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write custom ClickHouse SQL for SigNoz dashboard panels?

To write custom ClickHouse SQL for SigNoz dashboards, generate raw queries tailored for timeseries, value, or table panels. You must leverage pre-extracted columns and end queries with a SETTINGS clause for monitoring.

When should I use raw ClickHouse queries instead of the SigNoz query builder?

Use raw ClickHouse queries when the built-in SigNoz query builder cannot express the required data shape, such as when you need complex joins, window functions, or body text extractions on logs and traces.

Can I filter logs and traces by resource attributes in ClickHouse SQL?

Yes, you can filter logs and traces by resource attributes in ClickHouse SQL. The queries should leverage pre-extracted columns and documented resource-filter patterns to scope your dashboard panel data accurately.

What is the correct format for monitoring queries in SigNoz dashboards?

The correct format for monitoring queries in SigNoz dashboards requires a SETTINGS clause at the end of your raw ClickHouse SQL. This ensures the database executes the log and trace queries with the intended monitoring configurations.

Does SigNoz support table panels for log and trace data exploration?

Yes, SigNoz supports table panels alongside timeseries and value widgets for log and trace data exploration. You can generate ad-hoc ClickHouse queries to populate these specialized dashboard panels with custom data shapes.

Why do my custom ClickHouse queries fail on SigNoz dashboards?

Custom ClickHouse queries may fail on SigNoz dashboards if they omit the mandatory SETTINGS clause or fail to use pre-extracted columns. Ensure your SQL leverages documented resource-filter patterns for logs and traces.