Learn how to filter, manipulate, extend, and summarize your data.
The Query tab provides you with robust computation and processing power to get deeper insights into your data. It enables you to filter, manipulate, extend, and summarize your data.
To query your data, go to the Query tab and choose one of the following options:
You can easily switch between these methods at any point when creating the query.
Explain what you want to infer from your data in your own words and Axiom AI generates the valid APL query for you.
Show me the most common status responses in HTTP logs.
Axiom saves the prompts you type in the query generator. To find one of your previous prompts and generate an APL query for it:
While the query runs, the status bar gives you continuous updates about the number of rows examined, matched, and returned.
See below for more information about each of these steps.
Use the Where section to filter the results to specific events. For example, to filter for events that originate in a specific geolocation like France.
To add a filter:
geo.country
.==
for an exact match.France
.When you run the query, the results only show events matching the criteria you specified for the filter.
You can add multiple filters and combine them with AND/OR operators. For example, to filter for events that originate in France or Germany.
To add and combine multiple filters:
The query results display events that originate in France or Germany.
You can add groups of filters using the New Group element. Axiom supports AND/OR operators at the top level and one level deep.
Axiom provides powerful visualizations that display the output of aggregate functions across your dataset. The Summarize section provides you with several ways to visualize the query results. For example, the count
visualization displays the number of events matching your query over time. Some visualizations require an argument such as a field or other parameters.
For more information about visualizations, see Visualize data.
When visualizing data, segment data into specific groups to see more clearly how the data behaves. For example, to see how many events originate in each geolocation, select the count
visualization and group by geo.country
.
In the More section, specify the following additional options:
When you select the time range of a query, you specify the time interval where you want to look for events.
To select the time range, choose one of the following options:
Axiom creates the following two fields automatically for a new dataset:
_time
is the timestamp of the event. If the data you ingest doesn’t have a _time
field, Axiom assigns the time of the data ingest to the events._sysTime
is the time when you ingested the data.In most cases, you can use _time
and _sysTime
interchangeably. The difference between them can be useful if you experience clock skews on your event-producing systems.
APL is a data processing language that supports filtering, extending, and summarizing data. For more information, see Introduction to APL.
Some APL queries are explained below. The pipe symbol |
separates the operations as they flow from left to right, and top to bottom.
APL is case-sensitive for everything: dataset names, field names, operators, functions, etc.
Use double forward slashes (//
) for comments.
The below query returns the number of events from the sample-http-logs
dataset.
The limit
operator returns a random subset of rows from a dataset up to the specified number of rows. This query returns a thousand rows from sample-http-logs
randomly chosen by APL.
The summarize
operator produces a table that aggregates the content of the dataset. This query returns a chart of the avg(req_duration_ms)
, and a table of geo.city
and avg(req_duration_ms)
of the sample-http-logs
dataset from the time range of 2 days and time interval of 4 hours.
The results view adapts to the query. This means that it adds and removes components as necessary to give you the best experience. The toolbar is always visible and gives details on the currently running or last-run query. The other components are explained below.
When you run a query on a dataset without specifying a visualization, Axiom displays a table with the raw query results.
To view the details for an event, click the event in the table.
To configure the event details view, select one of the following in the top right corner:
In the event details view, click More for additional options:
To select the fields to be highlighted or displayed in the table, click Toggle fields panel, and then click the fields in the list.
Select Single column for event to highlight the selected fields below the raw data for each event. Alternatively, select
Column for each field to display each selected field in a different column without showing the raw event data. In this view, you can resize the width of columns by dragging the borders.
To configure the table options, click , and then select one of the following:
Axiom can also display an event timeline about the distribution of events across the selected time range. In the event timeline, each bar represents the number of events matched within that specific time interval. Holding the pointer over a bar reveals a blue line marking the total events and shows when those events occurred in that particular time range. To display the event timeline, click , and then click Show chart.
When you run a query with visualizations, Axiom displays all the visualizations that you add to the query. Hold the pointer over charts to get extra detail on each result set.
Below the charts, Axiom displays a table with the totals from each of the aggregate functions for the visualizations you specify.
If the query includes group-by clauses, there is a row for each group. Hold the pointer over a group row to highlight the group’s data on time series charts. Select the checkboxes on the left to display data only for the selected rows.
Click to access the following options for each chart:
For more information on each option, see Configure dashboard elements.
When you run a query that produces several visualizations, Axiom displays the charts separately. For example:
To merge the separately displayed charts into a single chart, click , and then select Merge charts.
On time series charts, holding the pointer over a specific time shows the same marker on similar charts for easy comparison.
When you run a query with a time series visualization, you can use the Compare period menu to select a historical time against which to compare the results of your time range. For example, to compare the last hour’s average response time to the same time yesterday, select 1 hr
in the time range menu, and then select -1 day
from the Compare period menu. The dotted line represents results from the base date, and the totals table includes the comparative totals.
In the event timeline, line charts, and heat maps, you can drag the pointer over the chart to highlight a specific time range, and then choose one of the following:
The time range of your query automatically updates to match what you selected.
To quickly search for an expression and highlight its occurrences within the query results:
Axiom’s search overrides the browser’s native search. Axiom’s search is more powerful because it highlights matching entries in all results returned by the query (while still respecting automatic limits). In contrast, the browser’s search can only highlight matching entries in the events rendered on your screen.
You can save and export the query and its results to use them in other contexts.
Save a query so that you and your team members can easily find it in the future. A saved query only includes the APL query itself, not the query results. You can later find saved queries in the Datasets tab.
To export a query and its results, click More in the top bar to access the following options: