Filters
This section of the document provides LOGQL general syntax and the related information. The search query consists of attributes, operators and a value. You can use the mouse or down-arrow key to highlight and select the attribute you want.
Example query syntax:
Example query result:
Note
You cannot use theline attribute for the first time. The line attribute allows you to search all your logs across the entire log body. For performance purposes, you can use line to search only after you have already added another filter to reduce the number of logs being searched.Switching between Basic QL and Advanced QL
Previously, switching between query modes could result in the loss of selected filters and query context, requiring users to recreate searches manually. To provide a seamless query-building experience, Log Management now preserves supported filters, operators, search criteria, and time range when switching between Basic QL and Advanced QL, enabling users to continue investigations without interruption.
Basic QL to Advanced QL
When you switch from Basic QL to Advanced QL, OpsRamp automatically converts the selected filters into an equivalent Advanced QL query. Since Basic QL supports only AND conditions between filters, the generated Advanced QL query contains only AND operators.
When switching from Advanced QL to Basic QL, only queries that can be represented using AND conditions are supported. If the Advanced QL query contains unsupported expressions such as OR, NOT, nested conditions, or other advanced query constructs, the query cannot be translated into Basic QL.
In such cases, OpsRamp displays the following message:
Information
This query contains expressions that cannot be represented in Basic QL.Users can continue working in Advanced QL or modify the query to use only supported AND conditions before switching to Basic QL.

Persisting Query Filters
Log Management preserves query context when switching between Basic QL and Advanced QL, ensuring that users can continue their investigation without losing previously configured search criteria.The following query attributes remain unchanged during query mode transitions:
- Selected filters
- Time range
- Search text
- Query state
- Applied operators
By preserving query context, users can move between query modes while maintaining the continuity of their search workflow and avoiding the need to recreate existing queries.
Time bucket (step) support in LogQL
OpsRamp Log Management supports explicit time bucket (step) values in Log Query Language (LogQL) time-series queries. A step controls the aggregation interval used for analysis and visualization, providing consistent granularity across time ranges. When you specify a step, LogQL uses that interval for bucket generation. Otherwise, LogQL selects a bucket based on the time range using the standardized OpsRamp auto-bucketing logic.
This allows users to control time-series aggregation granularity by specifying explicit time bucket values, ensuring consistent bucket intervals across repeated query executions and different time ranges. It aligns LogQL behavior with the standardized OpsRamp time-bucketing model, improves chart readability and result predictability, and enables the use of fixed aggregation intervals for more accurate and consistent time-series analysis and visualization.
Supported step values
The standard OpsRamp intervals are:
| Category | Values |
|---|---|
| Minutes | 1m, 5m, 10m, 15m, 30m |
| Hours | 1h |
Using step values in LogQL
Specify a time bucket in a LogQL time-series query.
For example:
... | timeseries(5m)
This query aggregates results into five-minute buckets.z
Step selection behavior
When a step is specified
LogQL uses a supported explicit step for time-series bucket generation.
For example:
... | timeseries(1h)
Results are aggregated into one-hour buckets regardless of the automatically calculated bucket size.
When a step is not specified
LogQL selects a bucket based on the selected time range.
Precedence rules
An explicit step takes precedence over an automatically selected bucket. The precedence order is:
- Explicit LogQL step
- Standardized auto bucket
For example, if the selected time range is 24 hours, the auto bucket is 15m, and the query step is 5m, LogQL applies 5m.
Time-series bucket generation
The step determines the interval between consecutive buckets. For a 24-hour time range with a 5m step, the approximate number of buckets is:
24 × 60 ÷ 5 = 288 buckets
The actual number may vary based on data availability and query execution boundaries.
Auto-bucketing logic
When no step is specified, LogQL uses the standardized time-range-to-bucket mapping:
| Time range | Auto step / time bucket | Approximate data points |
|---|---|---|
| ≤ 1 hour | 1 minute | ~60 |
| 1–3 hours | 1 minute | ~180 |
| 3–6 hours | 5 minutes | ~72 |
| 6–12 hours | 10 minutes | ~72 |
| 12–24 hours | 15 minutes | ~96 |
| 1–3 days | 30 minutes | ~144 |
| > 3 days | 1 hour | Based on selected range |
Validation rules
LogQL validates step values before query execution. Only supported time-bucket values are accepted.
Examples include 1m, 5m, 15m, 30m, and 1h.
A query with an invalid or unsupported step fails with a validation error.