My colleague Daniel has already described a concrete case in which he used ES|QL. Moved by curiosity I decided to attend an Elastic webinar on ES|QL, and I discovered some interesting things that I’d like to share with those of you who like using Elastic.
Elastic provides several possible ways to do searches. Current query languages create a complex experience for practitioners.
Elasticsearch Query Language (ES|QL) is Elasticʼs new piped language and query engine that transforms, enriches, and simplifies data investigations. The new ES|QL query engine delivers advanced search capabilities with concurrent processing, improving speed and efficiency irrespective of data source and structure. It lets you accelerate resolution by creating aggregations and visualizations from one screen, delivering an uninterrupted workflow.
This new query language was introduced in NetEye version 4.37 in which we introduced Elastic version 8.14.
Below are its key benefits:
Greater query speed
Simplified Elasticsearch
New transformative search engine
Improved alerting
Fast time to insights
The increased query speed is provided through these improvements:
No transpilation or translation
Queries are parsed and optimized for distributed execution
It operates in blocks, instead of one row at a time
It takes advantage of specialization and multi-threading
Benchmarking shown ES|QL can outperform DSL in many instances
ES|QL is faster than Elasticsearch aggregations in some cases, even without many optimizations.
Now let’s look at ES|QL Features:
Both unstructured and structured data
Procedural piped language
SQL-like filtering and data manipulation
A Piped Query Language was used because pipes are routinely used in Unix/Linux and because there are already other similar languages in other market products that have been very successful:
Splunkʼs Search Processing Language (SPL)
Microsoftʼs Kusto Query Language (KQL)
Amazonʼs CloudWatch queries
Now let’s see how this language offers benefits within the three pillars of Elastic Stack.
In search, developers will benefit from a simplified coding and querying experience with ES|QL, saving time and reducing cost with these efficiencies.
ES|QL delivers a simple way of understanding more about your data: what it contains, how it should be organized, and how to troubleshoot when issues arise, all again saving time and reducing cost.
ES|QL streamlines tasks into one query which can be concurrently processed for even faster performance, providing a lower TCO, and thus more for less.
In observability, using ES|QL greatly simplifies the analysis of metrics, logs, and traces from a single query, quickly identifying performance issues, all from a single search box. You can define fields on the fly, enrich data with lookups, and process queries concurrently, for speed and efficiency.
Integrating ES|QL with Elastic ML and AiOps improves detection accuracy along with aggregated value thresholds.
And finally, for security, ES|QL enhances SecOps by streamlining workflows and investigations: providing a singular place to find what you are looking for. Pull in critical context for investigations with ES|QL lookups, and enrich data and defining fields on the fly for valuable insights for accelerated action.
ES|QL reduces alarm fatigue and ensures more accurate alerts by incorporating aggregated values in detection rules.
Currently, this query language still has limitations (and note that it’s still under development):
Processing commands take a table as input and produce a table as output
You can chain processing commands, separated by a pipe character: |
Each processing command works on the output table of the previous command.
Here is the list of Process Commands:
dissect
drop
enrich
eval
grok
keep
limit
mv_expand
rename
sort
stats… by
where
And here’s the ES|QL Functions Operators that create conditions out of boolean expressions, which can be formed using:
Relational operators such as <,>,<=, = >, ==, and !=
Boolean functions like starts_with
Boolean expressions created with eval
like to match strings using the wildcards ? and *
For example “?*nˮ matches John and Ethan, but not Natalie
rlike to match strings using regular expressions
While computationally expensive, rlike matches patterns such as timestamps and email addresses, etc., while (?<![0-9.+-1)(?>![+-]?(?:(?:[0-9]+(?:\.[0-9]+)?)|(?:\.[0-9]+))) matches decimal numbers
ES|QL uses a grok parser as shown previously
The in operator tests whether a literal or a field/column are members of a list of literals/values
Boolean operators can be used in combination using, and, or, and not
row long = [5013792, 2147483647, 501379200000] | eval int = TO_INTEGER(long)
If you’ve gotten this far, I want to give you a quick spoiler – something I discovered while talking to other Elastic guys. ES|QL will replace all other Elastic scripting languages (which will gradually be abandoned).
These Solutions are Engineered by Humans
Did you find this article interesting? Are you an “under the hood” kind of person? We’re really big on automation and we’re always looking for people in a similar vein to fill roles like this one as well as other roles here at Würth Phoenix.
Hi, I’m Franco and I was born in Monza. For 20 years I worked for IBM in various roles. I started as a customer service representative (help desk operator), then I was promoted to Windows expert. In 2004 I changed again and was promoted to consultant, business analyst, then Java developer, and finally technical support and system integrator for Enterprise Content Management (FileNet). Several years ago I became fascinated by the Open Source world, the GNU\Linux operating system, and security in general. So for 4 years during my free time I studied security systems and computer networks in order to extend my knowledge. I came across several open source technologies including the Elastic stack (formerly ELK), and started to explore them and other similar ones like Grafana, Greylog, Snort, Grok, etc. I like to script in Python, too. Then I started to work in Würth Phoenix like consultant. Two years ago I moved with my family in Berlin to work for a startup in fintech(Nuri), but the startup went bankrupt due to insolvency. No problem, Berlin offered many other opportunities and I started working for Helios IT Service as an infrastructure monitoring expert with Icinga and Elastic, but after another year I preferred to return to Italy for various reasons that we can go into in person 🙂 In my free time I continue to dedicate myself to my family(especially my daughter) and I like walking, reading, dancing and making pizza for friends and relatives.
Author
Franco Federico
Hi, I’m Franco and I was born in Monza. For 20 years I worked for IBM in various roles. I started as a customer service representative (help desk operator), then I was promoted to Windows expert. In 2004 I changed again and was promoted to consultant, business analyst, then Java developer, and finally technical support and system integrator for Enterprise Content Management (FileNet). Several years ago I became fascinated by the Open Source world, the GNU\Linux operating system, and security in general. So for 4 years during my free time I studied security systems and computer networks in order to extend my knowledge. I came across several open source technologies including the Elastic stack (formerly ELK), and started to explore them and other similar ones like Grafana, Greylog, Snort, Grok, etc. I like to script in Python, too. Then I started to work in Würth Phoenix like consultant. Two years ago I moved with my family in Berlin to work for a startup in fintech(Nuri), but the startup went bankrupt due to insolvency. No problem, Berlin offered many other opportunities and I started working for Helios IT Service as an infrastructure monitoring expert with Icinga and Elastic, but after another year I preferred to return to Italy for various reasons that we can go into in person :) In my free time I continue to dedicate myself to my family(especially my daughter) and I like walking, reading, dancing and making pizza for friends and relatives.
We all know that NetEye Upgrades are boring activities. Upgrading is important and useful because it brings you bug fixes and new features, but nonetheless it's extremely expensive in terms of time. The most boring, tiring and lengthy part is Read More
In today’s digital landscape, cybersecurity is paramount. As a technical consultant, I’ve seen firsthand how organizations struggle to keep up with evolving threats. One tool that's consistently stood out in the fight against cyber threats is Elastic Defend. In this Read More
Hi all, it's been a while. I'm deeply sorry not to have sent out some blog posts lately, so now I'll try to get back your trust by providing some useful information. Not only that, I'll even go out of Read More
At the beginning of the month we released NetEye version 4.37 that contains Elastic Stack 8.14.3. Every version update of Elastic has both improvements and additions. To see all available integrations in NetEye, click on the screenshot here: As you Read More
In order to be able to carry out detailed network monitoring, an IT administrator naturally wants to know what is happening in his or her network. To obtain this information, the network flows must of course be analyzed. Many network Read More