What is ONQL?
ONQL is a query language for retrieving and organizing monitoring data in Site24x7. Instead of configuring individual parameters manually, you can write a query that specifies the monitors you want to retrieve data for, the attributes and metrics to include, the conditions to apply, the time period, and how the results should be ordered.
The query is interpreted to retrieve the relevant monitoring data based on the specified criteria.
How ONQL works
Consider an example where you want to retrieve the details of server monitors such as monitor name and the average CPU usage over the last 24 hours. The following query retrieves this information:
reporttype="server" | include(monitoring_inventory.monitor_name, avg(performance.cpu_utilization)) timeperiod last_24_hours
When a query is given, the following details are validated before fetching the data:
- Syntax: Confirms if the provided query is valid (for example, if a bracket is not closed, it will highlight this error).
- Semantics: Confirms if the provided query is compatible with the feature in which it was raised. For example, if a query is raised in Custom Report, all attributes included should be those supported in the given category.
These validations are performed as you type the query, with relevant hints, prompts, and error messages displayed in real time.

Benefits
ONQL offers features that guide you through writing queries, help prevent errors, and simplify query creation. The features and assistance they offer in building valid queries include:
- Live validation: Identifies syntax and semantic errors as you type the query. The query editor highlights the clause containing the error and displays a relevant error message below the editor, helping you identify and correct issues before executing the query.
- Context-aware suggestions: Press Ctrl + Space (Windows), Option + Space (macOS), or Shift + Space (Linux) to view suggestions based on the selected monitor category and the attributes available in your account. Each attribute is displayed with its label and unit, where applicable, helping you select the appropriate data.
- Recent queries: Click the time icon
to view the last five used queries. - Natural language prompting: Use the Zia icon
to generate ONQL queries from natural language descriptions. Review the generated query, choose from suggested alternatives, and make any necessary changes before executing it. - Unit conversion: Convert metric values into supported units within the same unit family using the
inmodifier. For example, display time values in hours or network speeds in Mbps without modifying the underlying metric. - Child entity data: Retrieve data for individual child entities, such as network interfaces, disks, or pods, using relationship attributes like
child. This provides detailed visibility into individual components associated with a monitor. - Time bucketing: Use
timesliceto divide the selected reporting period into smaller intervals, such as hours, days, weeks, months, or quarters. This helps you analyze performance trends over time instead of viewing a single aggregated value for the entire period.
- While building a query, suggestions are generated based on the monitor categories and attributes available in your account. If an attribute is not listed, it indicates that the attribute is not supported for the selected monitor category.
- Attributes under performance and resource inventory vary based on the resources in your account and the selected monitor category.
Related articles
Here are some supporting documents about ONQL:
-
On this page
- How ONQL works
- Benefits
- Supporting documents
