- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Define Scripted Fields in Kibana 7.6
With scripted fields in Kibana, we can create new fields not originally indexed in Elasticsearch that are computed at query time and added as a new field to the resulting documents. In this hands-on lab, we will explore the capabilities of scripted fields in Kibana by creating and visualizing some of our own.

Lab Info
Table of Contents
-
Challenge
Create and Save the kilobytes Scripted Field for the Logs Index Pattern
- Create a new scripted field called kilobytes for the
logs
index pattern. - Divide the value of the
bytes
field by 1024 to calculate the value for the scripted field. - Save the field.
- Create a new scripted field called kilobytes for the
-
Challenge
Create and Save the flight Scripted Field for the Flights Index Pattern
- Create a new scripted field called flight for the
flights
index pattern. - Concatenate a combination of static strings and the fields
FlightNum
,OriginAirportID
, andDestAirportID
to produce values that look like FlightFlightNum
:OriginAirportID
toDestAirportID
(for example: Flight 3CG21F9: EZE to SHA). - Save the field.
- Create a new scripted field called flight for the
-
Challenge
Create and Save the system.memory.buffercache.pct Scripted Field for the metricbeat-* Index Pattern
- Create a new scripted field called system.memory.buffercache.pct for the
metricbeat-*
index pattern. - Subtract the value of
system.memory.actual.used.pct
fromsystem.memory.used.pct
only if both fields do not have a size of 0 (otherwise known as a null value). - Format the scripted field as a percentage number.
- Save the field.
- Create a new scripted field called system.memory.buffercache.pct for the
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.