- Lab
- A Cloud Guru
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.
Path 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
What's a lab?
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.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.