CO

Provides syntax and investigative support for Coralogix DataPrime queries.

Install

mkdir -p .claude/skills/coralogix-analysis && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7554" && unzip -o skill.zip -d .claude/skills/coralogix-analysis && rm skill.zip

Installs to .claude/skills/coralogix-analysis

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Coralogix log analysis with DataPrime query language. Use when querying Coralogix logs, metrics, or traces. Provides syntax reference and intelligent investigation scripts.
172 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Analyze log statistics
  • Perform strategic log sampling
  • Extract unique error signatures
  • Query logs using DataPrime
  • Correlate traces with logs

How it works

The skill uses Python scripts to perform statistics-first investigation, clustering log patterns and correlating them with trace data.

Inputs & outputs

You give it
Service name and time range
You get back
Statistical analysis and investigation scripts

When to use coralogix-analysis

  • Writing log analysis queries
  • Troubleshooting production logs
  • Analyzing trace data for performance issues

About this skill

Coralogix Analysis

Authentication

IMPORTANT: Credentials are injected automatically by a proxy layer. Do NOT check for CORALOGIX_API_KEY or other API keys in environment variables - they won't be visible to you. Just run the scripts directly; authentication is handled transparently.

Configuration environment variables you CAN check (non-secret):

  • CORALOGIX_DOMAIN - Team hostname (e.g., myteam.app.cx498.coralogix.com)
  • CORALOGIX_REGION - Region code (e.g., us2, eu1) - fallback if domain not set

Region mapping (the scripts auto-detect based on domain):

  • US1: *.app.coralogix.usapi.us1.coralogix.com
  • US2: *.app.cx498.coralogix.comapi.us2.coralogix.com
  • EU1: *.coralogix.comapi.eu1.coralogix.com
  • EU2: *.app.eu2.coralogix.comapi.eu2.coralogix.com
  • AP1: *.app.coralogix.inapi.ap1.coralogix.com
  • AP2: *.app.coralogixsg.comapi.ap2.coralogix.com

MANDATORY: Statistics-First Investigation

NEVER dump raw logs. Always follow this pattern:

STATISTICS → SAMPLE → SIGNATURES → CORRELATE
  1. Statistics First - Know volume, error rate, and top patterns before sampling
  2. Strategic Sampling - Choose the right strategy based on statistics
  3. Pattern Extraction - Cluster similar errors to find root causes
  4. Context Correlation - Investigate around anomaly timestamps

Available Scripts

All scripts are in .claude/skills/observability-coralogix/scripts/

PRIMARY INVESTIGATION SCRIPTS

get_statistics.py - ALWAYS START HERE

Comprehensive statistics with pattern extraction and anomaly detection.

python .claude/skills/observability-coralogix/scripts/get_statistics.py [--service SERVICE] [--app APP] [--time-range MINUTES]

# Examples:
python .claude/skills/observability-coralogix/scripts/get_statistics.py --time-range 60
python .claude/skills/observability-coralogix/scripts/get_statistics.py --service payment --app otel-demo

Output includes:

  • Total count, error count, error rate percentage
  • Severity distribution
  • Top error patterns (crucial for quick triage)
  • Time bucket anomalies (spike/drop detection via z-score)
  • Top services by log volume
  • Actionable recommendation

sample_logs.py - Strategic Sampling

Choose the right sampling strategy based on statistics.

python .claude/skills/observability-coralogix/scripts/sample_logs.py --strategy STRATEGY [--service SERVICE] [--app APP]

# Strategies:
#   errors_only   - Only ERROR/CRITICAL logs (default for incidents)
#   around_anomaly - Logs within time window of specific timestamp
#   first_last    - First N/2 + last N/2 logs (timeline view)
#   random        - Random sample across time range
#   all           - All severity levels (use sparingly)

# Examples:
python .claude/skills/observability-coralogix/scripts/sample_logs.py --strategy errors_only --service payment
python .claude/skills/observability-coralogix/scripts/sample_logs.py --strategy around_anomaly --timestamp "2026-01-27T05:00:00Z" --window 60
python .claude/skills/observability-coralogix/scripts/sample_logs.py --strategy first_last --service checkout --limit 50

extract_signatures.py - Pattern Clustering

Normalize and cluster log messages to see unique issue patterns.

python .claude/skills/observability-coralogix/scripts/extract_signatures.py --service SERVICE [--severity SEVERITY] [--max-signatures N]

# Examples:
python .claude/skills/observability-coralogix/scripts/extract_signatures.py --service payment --severity ERROR
python .claude/skills/observability-coralogix/scripts/extract_signatures.py --app otel-demo --max-signatures 30

Normalizes variable parts (UUIDs, IPs, timestamps, numbers) to find:

  • Dominant error patterns (> 50% = single root cause likely)
  • Diverse errors (many patterns = multiple issues)
  • Affected services per pattern

UTILITY SCRIPTS

list_services.py - Service Discovery

python .claude/skills/observability-coralogix/scripts/list_services.py [--time-range MINUTES]

get_health.py - Quick Health Check

python .claude/skills/observability-coralogix/scripts/get_health.py <service> [--time-range MINUTES]

get_errors.py - Quick Error Fetch

python .claude/skills/observability-coralogix/scripts/get_errors.py <service> [--app APPLICATION] [--time-range MINUTES]

query_logs.py - Raw DataPrime Queries

For custom queries not covered by other scripts.

python .claude/skills/observability-coralogix/scripts/query_logs.py "<dataprime_query>" [--time-range MINUTES] [--limit N]

DataPrime Syntax Quick Reference

Filters

# Equality (use == not =)
$l.subsystemname == 'api-server'

# Severity - use ENUM values (no quotes!)
# Valid: VERBOSE, DEBUG, INFO, WARNING, ERROR, CRITICAL
$m.severity == ERROR
$m.severity == WARNING || $m.severity == ERROR

# Text search (case-insensitive) - use ~~ not 'contains'
$d ~~ 'timeout'
$d ~~ 'connection refused'

# Combine filters with &&
$l.subsystemname == 'payment' && $m.severity == ERROR

Aggregations

# Count
| aggregate count() as total

# Group by field
| groupby $l.subsystemname aggregate count() as cnt

# Time bucketing
| timebucket 5m aggregate count() as cnt

# Multiple aggregations
| groupby $l.subsystemname aggregate count() as cnt, avg($d.duration) as avg_duration

# Order and limit
| orderby cnt desc | limit 20

Common Fields

  • $l.applicationname - Application/environment name (e.g., "otel-demo")
  • $l.subsystemname - Service name (e.g., "payment", "checkout")
  • $m.severity - Log level enum: VERBOSE, DEBUG, INFO, WARNING, ERROR, CRITICAL
  • $m.timestamp - Event timestamp
  • $d - Log message/data (use ~~ for text search)

Common Query Patterns

1. List all services with log counts

source logs | groupby $l.subsystemname aggregate count() as cnt | orderby cnt desc | limit 30

2. Error count by service

source logs | filter $m.severity == ERROR | groupby $l.subsystemname aggregate count() as errors | orderby errors desc

3. Error rate over time

source logs | filter $m.severity == ERROR | groupby $m.timestamp / 5m as bucket aggregate count() as errors | orderby bucket asc

4. Errors for specific service

source logs | filter $l.subsystemname == 'payment' | filter $m.severity == ERROR | limit 50

5. Search for specific error message

source logs | filter $d ~~ 'connection refused' | limit 20

Advanced DataPrime Patterns

Bracket Notation for Special Fields

K8s fields often have dots in names. Use bracket notation:

# Wrong - treats as nested path
$d.kubernetes.namespace

# Correct - literal field name with dot
$d['kubernetes.namespace']
$d['resource.attributes.k8s_pod_name']

Time-Based Comparisons

Compare logs before/after a time threshold:

# Count logs in last hour vs older
source logs | countby if($m.timestamp > now() - 1h, 'last_hour', 'older')

# Find logs older than 5 minutes
source logs | filter $m.timestamp < now() - 5m

K8s Container Restarts

Find unstable containers:

source logs
| choose resource.attributes.k8s_container_restart_count:number as restarts,
         resource.attributes.k8s_container_name as container,
         resource.attributes.k8s_deployment_name as deployment
| filter restarts > 0
| groupby deployment aggregate max(restarts) as max_restarts
| orderby max_restarts desc

Peak Error Window

Find the 10-minute window with most errors:

source logs
| filter $m.severity == ERROR
| groupby $m.timestamp / 10m as bucket aggregate count() as cnt
| orderby cnt desc
| limit 5

Fuzzy Search All Fields

When you don't know which field contains the value:

# Search all fields for text
source logs | filter $d ~~ 'connection refused'

# Or use wildfind
source logs | wildfind 'timeout'

Anti-Patterns to Avoid

  1. NEVER skip statistics - get_statistics.py is MANDATORY first step
  2. Unbounded queries - Always specify time ranges and limits
  3. Quoting severity values - Use enum: ERROR not 'ERROR'
  4. Using 'contains' - Use ~~ operator for text search
  5. Missing application filter - For multi-tenant, filter by $l.applicationname
  6. Fetching all logs - Use sampling strategies, not limit 10000
  7. Ignoring anomaly timestamps - Use around_anomaly to investigate spikes
  8. Reading logs without patterns - Always extract signatures for RCA
  9. Dot notation for K8s fields - Use bracket notation: $d['k8s.pod.name']

Investigation Workflow

Standard Incident Investigation

┌─────────────────────────────────────────────────────────────┐
│ 1. STATISTICS FIRST (mandatory)                              │
│    python get_statistics.py --service <service>              │
│    → Know volume, error rate, top patterns, anomalies        │
└─────────────────────────────────────────────────────────────┘
                             │
                             ▼
                     Dominant Issue?
               ┌─────────────┴─────────────┐
               │                           │
      YES (>80% one pattern)               NO (mixed errors)
               │                           │
               ▼                           ▼
┌─────────────────────────────┐  ┌───────────────────────────────────────────┐
│ 2. FAST PATH                │  │ 2. DEEP DIVE                              │
│    Sample errors directly   │  │    python extract_signatures.py           │
│    python sample_logs.py    │  │    python sample_logs.py --strategy ...   │
│    → Verify hypothesis      │  │    → Cluster and analyze patterns         │
└─────────────────────────────┘  └───────────────────────────────────────────┘

Example: Payment Service Investigation

# Step 1: Statistics first - ALWAYS
python .claude/skills/

---

*Content truncated.*

When not to use it

  • Dumping raw logs without analysis
  • Manual query writing without statistical context

Prerequisites

Coralogix accountDataPrime query access

Limitations

  • Requires DataPrime query language knowledge for custom queries

How it compares

It mandates a statistics-first approach to prevent raw log dumping, focusing on pattern extraction and anomaly detection.

Compared to similar skills

coralogix-analysis side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
coralogix-analysis (this skill)15moReviewIntermediate
agent-session-monitor26moReviewIntermediate
ideogram-observability125dReviewIntermediate
dt-app-notebooks01moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

agent-session-monitor

alibaba

Real-time agent conversation monitoring - monitors Higress access logs, aggregates conversations by session, tracks token usage. Supports web interface for viewing complete conversation history and costs. Use when users ask about current session token consumption, conversation history, or cost statistics.

26

ideogram-observability

jeremylongshore

Set up comprehensive observability for Ideogram integrations with metrics, traces, and alerts. Use when implementing monitoring for Ideogram operations, setting up dashboards, or configuring alerting for Ideogram integration health. Trigger with phrases like "ideogram monitoring", "ideogram metrics", "ideogram observability", "monitor ideogram", "ideogram alerts", "ideogram tracing".

11

dt-app-notebooks

TechShady

Work with Dynatrace notebooks - create, modify, query, and analyze notebook JSON. Derives from the dt-app-dashboards skill with notebook-specific differences documented here.

00

clay-observability

jeremylongshore

Set up comprehensive observability for Clay integrations with metrics, traces, and alerts. Use when implementing monitoring for Clay operations, setting up dashboards, or configuring alerting for Clay integration health. Trigger with phrases like "clay monitoring", "clay metrics", "clay observability", "monitor clay", "clay alerts", "clay tracing".

11

model-usage

openclaw

Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.

548

analytics-tracking

davila7

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," or "tracking plan." For A/B test measurement, see ab-test-setup.

736

Search skills

Search the agent skills registry