Basic Searching
Splunk uses asearch command for basic searching, while in APL, simply specify the dataset name followed by a filter.
Splunk:
Filtering
In Splunk, perform filtering using thesearch command, usually specifying field names and their desired values. In APL, perform filtering by using the where operator.
Splunk:
Aggregation
In Splunk, thestats command is used for aggregation. In APL, perform aggregation using the summarize operator.
Splunk:
Time Frames
In Splunk, select a time range for a search in the time picker on the search page. In APL, filter by a time range using the where operator and thetimespan field of the dataset.
Splunk:
Sorting
In Splunk, thesort command is used to order the results of a search. In APL, perform sorting by using the sort by operator.
Splunk:
Selecting Fields
In Splunk, use the fields command to specify which fields to include or exclude in the search results. In APL, use theproject operator, project-away operator, or the project-keep operator to specify which fields to include in the query results.
Splunk:
Renaming Fields
In Splunk, rename fields using therename command, while in APL rename fields using the extend, and project operator. Here is the general syntax:
Splunk:
Calculated Fields
In Splunk, use theeval command to create calculated fields based on the values of other fields, while in APL use the extend operator to create calculated fields based on the values of other fields.
Splunk
Structure and Concepts
The following table compares concepts and data structures between Splunk and APL logs.Functions
The following table specifies functions in APL that are equivalent to Splunk Functions.
In Splunk, the function is invoked by using the
eval operator. In APL, it’s used as part of the extend or project.
In Splunk, the function is invoked by using the eval operator. In APL, it can be used with the where operator.
Filter
APL log queries start from a tabular result set in which a filter is applied. In Splunk, filtering is the default operation on the current index. You may also use the where operator in Splunk, but we don’t recommend it.Get n events or rows for inspection
APL log queries also supporttake as an alias to limit. In Splunk, if the results are ordered, head returns the first n results. In APL, limit isn’t ordered, but it returns the first n rows that are found.
Get the first n events or rows ordered by a field or column
For the bottom results, in Splunk, usetail. In APL, specify ordering direction by using asc.
Extend the result set with new fields or columns
Splunk has aneval function, but it’s not comparable to the eval operator in APL. Both the eval operator in Splunk and the extend operator in APL support only scalar functions and arithmetic operators.
Rename
APL uses theproject operator to rename a field. In the project operator, a query can take advantage of any indexes that are prebuilt for a field. Splunk has a rename operator that does the same.
Format results and projection
Splunk uses thetable command to select which columns to include in the results. APL has a project operator that does the same and more.
Splunk uses the
field - command to select which columns to exclude from the results. APL has a project-away operator that does the same.
Aggregation
See the list of summarize aggregations functions that are available.Sort
In Splunk, to sort in ascending order, you must use thereverse operator. APL also supports defining where to put nulls, either at the beginning or at the end.
Whether you’re just starting your transition or you’re in the thick of it, this guide can serve as a helpful roadmap to assist you in your journey from Splunk to Axiom Processing Language.
Dive into the Axiom Processing Language, start converting your Splunk queries to APL, and explore the rich capabilities of the Query tab. Embrace the learning curve, and remember, every complex query you master is another step forward in your data analytics journey.