Skip to main content
Logging in Nebius AI Cloud implements the LogQL query language. This page covers the supported syntax with examples and limitations specific to Nebius AI Cloud.

Stream selectors

Every LogQL query starts with a stream selector inside curly braces. You must always specify the __bucket__ label to select the log bucket:
  • sp_serial for serial logs of Compute virtual machines
  • sp_mlflow for Managed Service for MLflow logs
  • sp_postgres for Managed Service for PostgreSQL® logs
  • sp_cloudapps for Nebius Applications logs
  • default for your own logs
{__bucket__="sp_postgres"}
Supported matching operators:
OperatorDescriptionExample
=Exact match{__bucket__="sp_postgres", container="pgbouncer"}
!=Negation{__bucket__="sp_postgres", container!="pgbouncer"}
=~Regex match{__bucket__="sp_postgres", container=~"pg.*"}
!~Regex negation{__bucket__="sp_postgres", container!~"pgbouncer|odyssey"}

Line filters

After the stream selector, chain line filters to search the log message text:
OperatorDescriptionExample
|=Line contains text{...} |= "error"
!=Line doesn’t contain text{...} != "healthcheck"
|~Line matches regex{...} |~ "status=5\\d+"
!~Line doesn’t match regex{...} !~ "GET /health"
You can chain multiple filters to narrow results:
{__bucket__="sp_postgres"} |= "ERROR" != "vacuum"

Examples

Find deadlocks in PostgreSQL® logs:
{__bucket__="sp_postgres"} |= "deadlock detected"
Find deadlocks excluding autovacuum-related messages:
{__bucket__="sp_postgres"} |= "deadlock detected" != "autovacuum"

Filter by log level

{__bucket__="default"} | level="error"

Search with regex

Find HTTP 5xx status codes:
{__bucket__="default"} |~ "status=5\\d+"

Find slow requests

{__bucket__="default"} | duration > 1s

Limitations

Logging’s LogQL implementation has the following limitations:
  • You must always include __bucket__ in the stream selector. Queries without it return no entries.
  • The step value (interval between points) must be smaller than the range value (the interval over which aggregation is performed).
  • Alerts on aggregated metrics values are not supported.
  • The entries with non-empty __error__ value are ignored. As a result, filtering by error is not possible.
  • The following functions are not supported:
    • bytes_rate, bytes_over_time functions
    • absent_over_time (because alerts on aggregated metrics values are not supported)
    • topk, bottomk without aggregation by label (because no entries are shown when labels are empty)
    • sort, sort_desc aggregations
    • without aggregation clauses
    • vector function
    • approx_topk aggregation

Postgres, PostgreSQL and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada, and used with their permission.