coralogix-analysis
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.zipInstalls 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.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
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.us→api.us1.coralogix.com - US2:
*.app.cx498.coralogix.com→api.us2.coralogix.com - EU1:
*.coralogix.com→api.eu1.coralogix.com - EU2:
*.app.eu2.coralogix.com→api.eu2.coralogix.com - AP1:
*.app.coralogix.in→api.ap1.coralogix.com - AP2:
*.app.coralogixsg.com→api.ap2.coralogix.com
MANDATORY: Statistics-First Investigation
NEVER dump raw logs. Always follow this pattern:
STATISTICS → SAMPLE → SIGNATURES → CORRELATE
- Statistics First - Know volume, error rate, and top patterns before sampling
- Strategic Sampling - Choose the right strategy based on statistics
- Pattern Extraction - Cluster similar errors to find root causes
- 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
- ❌ NEVER skip statistics -
get_statistics.pyis MANDATORY first step - ❌ Unbounded queries - Always specify time ranges and limits
- ❌ Quoting severity values - Use enum:
ERRORnot'ERROR' - ❌ Using 'contains' - Use ~~ operator for text search
- ❌ Missing application filter - For multi-tenant, filter by $l.applicationname
- ❌ Fetching all logs - Use sampling strategies, not
limit 10000 - ❌ Ignoring anomaly timestamps - Use
around_anomalyto investigate spikes - ❌ Reading logs without patterns - Always extract signatures for RCA
- ❌ 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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| coralogix-analysis (this skill) | 1 | 5mo | Review | Intermediate |
| agent-session-monitor | 2 | 6mo | Review | Intermediate |
| ideogram-observability | 1 | 25d | Review | Intermediate |
| dt-app-notebooks | 0 | 1mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by incidentfox
View all by incidentfox →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.
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".
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.
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".
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.
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.