clickstack-investigation
Skill141 starsChanged 8 days agoApache-2.0View on GitHub
Investigate incidents with the customer's logs, traces and metrics in ClickHouse Observability, the managed ClickStack service in ClickHouse Cloud, through the ClickStack MCP server. Covers finding data sources, checking service health, explaining error spikes, latency regressions and post-deploy changes, drilling into traces, querying OpenTelemetry metrics, and confirming every write with the operator. Use when an investigation or a chat question needs telemetry stored in ClickHouse Observability, ClickStack or ClickHouse, when the customer asks to search their ClickHouse Observability logs or traces, or when checking its alerts and dashboards.
In this repository102 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- agentcore-observability-setupSkill
- agentcore-ops-reviewSkill
- aiml-access-diagnosticsSkill
- aiml-gpu-training-cluster-investigationSkill
- analytics-opensearch-expertiseSkill
- aws-backup-coverage-reviewSkill
- aws-eks-healthdashboardSkill
- aws-eks-operations-reviewSkill
- aws-fsxn-operations-reviewSkill
- aws-health-eventsSkill
- aws-natgw-traffic-analysisSkill
- aws-routingSkill
- aws-vpc-dns-investigationSkill
- bedrock-adoption-readinessSkill
- bedrock-operation-reviewSkill
- bluebox-observabilitySkill
- bronto-dataset-discoverySkill
- bronto-error-investigationSkill
- bronto-log-searchSkill
- cloudtrail-cost-optimizationSkill
- config-cost-optimizationSkill
- coralogix-ai-centerSkill
- coralogix-alertsSkill
- coralogix-case-analyticsSkill
- coralogix-case-managementSkill
- coralogix-casesSkill
- coralogix-dashboardsSkill
- coralogix-dataprimeSkill
- coralogix-datasetsSkill
- coralogix-data-usageSkill
- coralogix-docsSkill
- coralogix-infrastructureSkill
- coralogix-logsSkill
- coralogix-metrics-querySkill
- coralogix-ollySkill
- coralogix-rumSkill
- coralogix-service-catalogSkill
- coralogix-single-caseSkill
- coralogix-spansSkill
- coralogix-viewsSkill
- cribl-investigationSkill
- crm-production-investigation-guidelinesSkill
- database-migration-service-expertiseSkill
- database-rds-devopsSkill
- devops-agent-cost-insightsSkill
- dx-vif-resilienceSkill
- ecs-operation-reviewSkill
- eks-upgrade-readinessSkill
- elastic-csp-investigationSkill
- elastic-k8s-investigationSkill
- elastic-llm-obsSkill
- elastic-onboardingSkill
- elastic-service-reliabilitySkill
- elastic-sre-triageSkill
- enrich-with-aws-security-agentSkill
- eos-cost-analysisSkill
- firehose-operation-reviewSkill
- grafana-cloud-investigationSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 11 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Prefer the purpose-built query tools.
- Distinctive: line 40
If a tool you expect isn't available, the feature may not be enabled on the service.
- Very specific: line 44
Call clickstack_list_sources.
- Very specific: line 45
Call clickstack_describe_source on each source you'll query, before writing any filter.
- Very specific: line 46
If a source lists requiredSourceFilters, call clickstack_get_source_filter_values and pass sourceFilters on every query against it.
- Distinctive: line 49
If no source holds the affected service's data, say so and stop querying ClickHouse Observability for it.
- Very specific: line 53
Always pass startTime and endTime (ISO 8601).
- Distinctive: line 54
Start from the incident or alarm time: from about 30 minutes before it to now, or to its end.
- Distinctive: line 55
If a query returns nothing, widen the window once (for example to 24 hours) before concluding the data doesn't exist.
- Very specific: line 59
If there is a trace source, call clickstack_service_health for the window.
- Very specific: line 65
If there is no trace source, start with clickstack_event_patterns on the log source, filtered to the service and to error severity.
- Distinctive: line 67
Before blaming a dependency, check the flagged service's own runtime metrics (memory, CPU, garbage collection, restarts) on the metric …
- Very specific: line 74
If the errors are on spans, open one failing trace with clickstack_trace_waterfall (auto-pick mode with a filter on the error) to see which …
- Distinctive: line 86
Use this for "what changed", post-deploy checks, and new or disappearing behavior.
- Very specific: line 90
Look for a version or deployment attribute (such as service.version in resource attributes) with clickstack_table, and compare before and …
- Very specific: line 109
Prefer clickstack_event_patterns, clickstack_table and clickstack_service_health over raw rows.
- Distinctive: line 124
Before each write, show the operator exactly what you'll do: the tool, the target and the full change.
- Distinctive: line 125
Ask for confirmation immediately before the call, and make the call only after the operator confirms.
- Distinctive: line 126
If the operator declines, or DevOps Agent's approval is denied, don't retry the write and don't try another tool to the same effect.
- Distinctive: line 127
Never delete a source, dashboard, alert or webhook as part of an investigation.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ClickHouse Observability investigations
The ClickHouse Observability connector reaches the customer's ClickHouse Observability service in ClickHouse Cloud through the hosted ClickStack MCP server. ClickStack is the open-source observability stack; ClickHouse Observability is the managed service built on it. The hosted server adds a few tools and arguments to the open-source one, such as required source filters. The connector acts as the person who connected it, so it sees only the data sources their role allows.
ClickStack stores OpenTelemetry logs, traces and metrics in ClickHouse. Each kind of data is a source: a table plus the column mappings ClickStack needs to query it. Every query tool takes a sourceId.
Choosing tools
The server's instructions and each tool's description are kept current with the server. Read them before the first query; they give exact parameters and filter syntax. This skill gives the investigation order.
Prefer the purpose-built query tools. They return structured, ranked results and handle sampling, time bucketing and source mappings for you:
| Question | Tool |
| Which services are unhealthy right now, and compared with yesterday? | clickstack_service_health |
| What kinds of log messages or errors exist? | clickstack_event_patterns |
| What is new, or has stopped, since a baseline window? | clickstack_emerging_signals |
| What is different about the failing or slow rows? | clickstack_event_deltas |
| When did it start, and how did it trend? | clickstack_timeseries |
| Top-N, counts, breakdowns, single values | clickstack_table |
| Show me the raw rows | clickstack_search |
| Where does the time go in a slow operation? | clickstack_trace_top_time_consuming_operations |
| Show one example trace | clickstack_trace_waterfall |
clickstack_sql runs raw ClickHouse SQL. It is a last resort, for queries the tools above can't express: JOINs, sub-queries, window functions, or tables not registered as sources. A single-source aggregation, top-N, time series or row browse always uses a query tool.
If a tool you expect isn't available, the feature may not be enabled on the service. Say so in your findings rather than guessing.
Step 1: Find the data
- Call
clickstack_list_sources. Note each source'sid, its kind (log, trace, metric, session) and anyrequiredSourceFilters. - Call
clickstack_describe_sourceon each source you'll query, before writing any filter. It returns the real column names and sample values. Never guess a column name. - If a source lists
requiredSourceFilters, callclickstack_get_source_filter_valuesand passsourceFilterson every query against it. Queries without them are rejected. - Map the incident's service to ClickStack's
ServiceNamevalues. Names often differ from AWS resource names: check the sampled values rather than assuming.
If no source holds the affected service's data, say so and stop querying ClickHouse Observability for it.
Step 2: Set the time window
- Always pass
startTimeandendTime(ISO 8601). Several tools default to the last 15 minutes, which misses most incidents. - Start from the incident or alarm time: from about 30 minutes before it to now, or to its end.
- If a query returns nothing, widen the window once (for example to 24 hours) before concluding the data doesn't exist.
Step 3: Triage
- If there is a trace source, call
clickstack_service_healthfor the window. It ranks services worst first against the same window yesterday, with error groups and likely rollouts. - Branch on what it reports:
- A service is critical or degraded on errors: go to "Error spike".
- A service is critical or degraded on latency: go to "Latency regression".
- New operations or new error groups are flagged: go to "Something changed".
- Everything is healthy: that is a valid answer. Check logs with
clickstack_emerging_signalsfor the window, then report that ClickHouse Observability shows no anomaly, rather than inventing one.
- If there is no trace source, start with
clickstack_event_patternson the log source, filtered to the service and to error severity.
Before blaming a dependency, check the flagged service's own runtime metrics (memory, CPU, garbage collection, restarts) on the metric source.
Error spike
clickstack_timeseriesof error count for the service, by minute, to find when it started.clickstack_event_patternson the logs for the service and window, filtered to errors, to see which messages dominate. Each pattern has awhereSnippet: pass it aswheretoclickstack_searchto read example rows.clickstack_event_deltaswith failing rows as the target and successful rows (or the window before the spike) as the baseline. Read the top five properties, not only the first: they are often independent causes, such as one version, one host, one endpoint or one customer.- If the errors are on spans, open one failing trace with
clickstack_trace_waterfall(auto-pick mode with a filter on the error) to see which hop failed first.
Latency regression
clickstack_timeseriesof p95 or p99Durationfor the service, by minute, to find when it started.clickstack_tablegrouped bySpanNamefor the service, to find which operations got slower.- For each slow operation, call
clickstack_trace_top_time_consuming_operationsonce, with that service and operation as the parent filter andminParentDurationMsset to the slow threshold. Don't merge operations into one call. A child shared by several slow operations points to a shared cause. clickstack_event_deltason the dominant slow child, with slow rows (Durationabove the threshold) as the target and fast rows as the baseline. Scope both to the same operation.clickstack_trace_waterfallon one slow trace to confirm the finding with a concrete example.
Something changed
Use this for "what changed", post-deploy checks, and new or disappearing behavior.
clickstack_emerging_signalswith the current window and an earlier baseline of the same length, where the baseline ends when the current window starts. It returns patterns that emerged and patterns that disappeared.- For each emerging pattern, read example rows with
clickstack_search. - Look for a version or deployment attribute (such as
service.versionin resource attributes) withclickstack_table, and compare before and after.
An empty emerging list means nothing novel. Report that rather than stretching small changes into findings.
Metrics
Metric sources need more care than logs and traces. See references/metrics.md before querying one.
Alerts and dashboards
clickstack_get_alertwithstate: "ALERT"lists the alerts that are firing now. Check it at the start of an investigation for related alerts.clickstack_search_dashboardsandclickstack_get_dashboardfind dashboards the team already uses for a service.clickstack_query_tileruns a dashboard tile's query for your window.
Writing filters
Most query tools take where and whereLanguage. See references/query-syntax.md for the syntax and its pitfalls, such as Lucene matching substrings rather than exact values.
Keeping results small
- Prefer
clickstack_event_patterns,clickstack_tableandclickstack_service_healthover raw rows. They summarize thousands of rows into a ranked list. - With
clickstack_search, filter tightly, setcolumnsto the fields you need and keepmaxResultssmall. Setdenoise: trueto hide high-frequency repetitive rows and surface the unusual ones. - Scope every query to the affected service and window before widening.
Reporting findings
- For each finding, give the tool, source, filter and time window that support it, so an operator can rerun it in ClickHouse Observability.
- Give numbers from the results, such as error rate before and after, p99 before and after, or the share of failing rows on one host. Don't round a shift into a conclusion the data doesn't support.
- State what you checked and found nothing in, as well as what you found.
Rules for writes
A write is any call that creates, changes or deletes something in ClickHouse Observability: tools whose names start with clickstack_save_, clickstack_patch_ or clickstack_delete_, and any tool whose description says it changes or shares content.
- Make a write only when an operator explicitly asked for it. During triage and root-cause analysis, propose changes, such as a new alert or dashboard, as recommended actions instead.
- Before each write, show the operator exactly what you'll do: the tool, the target and the full change.
- Ask for confirmation immediately before the call, and make the call only after the operator confirms.
- If the operator declines, or DevOps Agent's approval is denied, don't retry the write and don't try another tool to the same effect. Report that it wasn't made.
- Never delete a source, dashboard, alert or webhook as part of an investigation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

