Adding a numeric filter to a Kibana dashboard allows you to filter data based on numerical values, such as range limits or specific numeric criteria. Here's how you can add and use numeric filters effectively in Kibana:
1. Create a Numeric Filter Using the Filter Bar
- Open Kibana Dashboard:
- Navigate to your Kibana dashboard where you want to add the numeric filter.
- Add a Filter:
- In the top bar of the dashboard, click on the "Add filter" button. This opens the filter configuration panel.
- Configure the Filter:
- Field: Select the numeric field you want to filter by. This field should be available in your dataset and should be of a numeric type (e.g.,
age
,price
,quantity
). - Operator: Choose the appropriate operator for your numeric filter. Common operators include:
is
: Exact match (e.g.,price is 100
).is greater than
: Values greater than a specified number (e.g.,price is greater than 100
).is less than
: Values less than a specified number (e.g.,price is less than 100
).is between
: Values within a range (e.g.,price is between 50 and 200
).
- Field: Select the numeric field you want to filter by. This field should be available in your dataset and should be of a numeric type (e.g.,
- Enter Values:
- Input the numeric value(s) corresponding to the operator you selected. For example, if you chose
is greater than
, enter the threshold value.
- Input the numeric value(s) corresponding to the operator you selected. For example, if you chose
- Save the Filter:
- Click on the "Save" or "Apply filter" button to add the filter to your dashboard.
- Review and Adjust:
- The dashboard will now be filtered according to your numeric criteria. You can adjust or remove filters as needed by using the filter bar at the top of the dashboard.
2. Add a Numeric Filter Using the Visualizations
You can also create numeric filters within individual visualizations and then add those visualizations to a dashboard.
- Open or Create a Visualization:
- Go to the "Visualize" section in Kibana and open an existing visualization or create a new one.
- Apply Numeric Filter to the Visualization:
- While configuring your visualization, you can add numeric filters directly in the "Bucket" or "Filter" section depending on the type of visualization.
- Save and Add to Dashboard:
- Save your visualization and then add it to your dashboard. The numeric filter applied to the visualization will filter the data accordingly.
3. Using the Query Bar for Numeric Filters
The Query Bar in Kibana allows you to write more advanced queries directly.
- Open Query Bar:
- Navigate to the Query Bar at the top of the dashboard or visualization.
- Write Numeric Queries:
- You can use Lucene Query Syntax or KQL (Kibana Query Language) for numeric filters. Examples:
- Lucene Query Syntax:
price:[100 TO *]
(Values greater than or equal to 100)price:[* TO 100]
(Values less than or equal to 100)price:50..200
(Values between 50 and 200)
- KQL:
price > 100
(Values greater than 100)price < 100
(Values less than 100)price >= 50 and price <= 200
(Values between 50 and 200)
- Lucene Query Syntax:
- You can use Lucene Query Syntax or KQL (Kibana Query Language) for numeric filters. Examples:
- Apply and Save:
- Press Enter or click the "Apply" button to apply the query. Save the dashboard to retain the filter.
4. Add Numeric Filters to Controls
You can also use Kibana’s Controls visualization to create interactive filters.
- Create Controls Visualization:
- Navigate to Visualize and create a new Controls visualization.
- Configure Controls:
- Add a Range Slider or Numeric Input to filter numeric data.
- Configure the control with the desired numeric field and set the range or specific values.
- Add to Dashboard:
- Save and add the Controls visualization to your dashboard. The interactive elements will allow users to filter data dynamically based on numeric input.
Summary
- Filter Bar: Use the "Add filter" button to create and apply numeric filters directly from the dashboard.
- Visualizations: Apply numeric filters when creating or configuring visualizations and add them to your dashboard.
- Query Bar: Write advanced numeric queries using Lucene or KQL syntax for more complex filtering.
- Controls Visualization: Use interactive elements like range sliders or numeric inputs for dynamic numeric filtering.
By using these methods, you can effectively manage and filter numeric data in Kibana to gain insights and visualize trends.
Make your mark
Join the writer's program
Are you a developer and love writing and sharing your knowledge with the world? Join our guest writing program and get paid for writing amazing technical guides. We'll get them to the right readers that will appreciate them.
Write for usBuild on top of Better Stack
Write a script, app or project on top of Better Stack and share it with the world. Make a public repository and share it with us at our email.
community@betterstack.comor submit a pull request and help us build better products for everyone.
See the full list of amazing projects on github