CQL examples and saved queries
The seven built-in saved queries, plus short patterns to adapt.
On this page
The built-in saved queries are listed by GET /api/v1/saved-queries.
Built-in saved queries#
Errors by service
level IN (error,fatal) | stats count() by service | sort -countFailed logins
log_type=auth auth_result=failure | stats count() by user_tok, host | sort -count | limit 50Top slow endpoints
log_type=nginx | stats p95(duration_ms), count() by http_path | sort -p95_duration_ms | limit 205xx rate
log_type=nginx | timechart span=1m count() by http_statusPII masked count
source=masking | stats sum(n) by rulek8s restarts and OOM
log_type=k8s (OOMKilled OR "Back-off restarting") | stats count() by k8s_ns, serviceGaps, last 24 h
source=gapsPatterns#
Count errors in a window and keep the top five services:
level=error | top 5 serviceCount only slow requests next to all requests:
log_type=nginx | stats count() as total, count_if(duration_ms>1000) as slow by http_pathFind a field that only some events carry:
order_id:exists level=error | fields ts, service, msgReport an inaccuracy (opens a support ticket in the portal; nothing is sent from this page)