betterstack-logs

Query Better Stack logs via the ClickHouse SQL API.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/usesofia/agents-toolkit --skill betterstack-logs-usesofia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: betterstack-logs
Source: https://github.com/usesofia/agents-toolkit/tree/main/skills/betterstack-logs
Command: npx skills add https://github.com/usesofia/agents-toolkit --skill betterstack-logs-usesofia

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Query Better Stack logs via the ClickHouse SQL API to extract actionable log data.

Core Features & Use Cases

  • Query logs from Better Stack using the SQL API (ClickHouse) to filter by term or correlation ID.
  • Extract structured data (dt, raw) for debugging and alerting.
  • Use with logs from multiple sources to diagnose production issues quickly and reproducibly.

Quick Start

Run the script to query Better Stack logs using a term or a correlation ID.

Frequently Asked Questions about betterstack-logs

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

FAQPage Schema
How do I query Better Stack logs using SQL?

Query Better Stack logs via the ClickHouse SQL API by running a shell script that filters by term or correlation ID. This extracts structured fields like dt and raw for debugging and alerting.

Can I use ClickHouse SQL to debug production issues from Better Stack logs?

Yes, querying Better Stack logs via the ClickHouse SQL API is designed for debugging production issues. You can extract actionable log data across multiple services emitting logs to diagnose problems quickly and reproducibly.

What environment variables do I need to query Better Stack logs?

Querying Better Stack logs requires configuring BETTERSTACK_USER, BETTERSTACK_PASS, and BETTERSTACK_ENDPOINT environment variables. You must also set a configured log source in the BETTERSTACK_SOURCE variable.

How do I filter telemetry logs by correlation ID?

You filter telemetry logs by correlation ID by running the query script against the ClickHouse SQL API. This extracts structured data matching that specific correlation ID for precise test failure investigations and error analysis.

What is the best way to extract structured data for log analysis from Better Stack?

The best way to extract structured data for log analysis is querying the Better Stack ClickHouse SQL API via a shell script. It retrieves structured fields like dt and raw to support debugging and alerting workflows.

Are there limitations when using the ClickHouse SQL API for Better Stack log analysis?

Better Stack log analysis via the ClickHouse SQL API depends entirely on the configured log source in BETTERSTACK_SOURCE. It requires proper environment variable authentication and is limited to logs actively emitted to your Better Stack sources.