How to Add a Numeric Filter on Kibana Dashboard?

Better Stack Team
Updated on October 26, 2024

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

  1. Open Kibana Dashboard:
    • Navigate to your Kibana dashboard where you want to add the numeric filter.
  2. Add a Filter:
    • In the top bar of the dashboard, click on the "Add filter" button. This opens the filter configuration panel.
  3. 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).
  4. 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.
  5. Save the Filter:
    • Click on the "Save" or "Apply filter" button to add the filter to your dashboard.
  6. 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.

  1. Open or Create a Visualization:
    • Go to the "Visualize" section in Kibana and open an existing visualization or create a new one.
  2. 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.
  3. 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.

  1. Open Query Bar:
    • Navigate to the Query Bar at the top of the dashboard or visualization.
  2. 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)
  3. 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.

  1. Create Controls Visualization:
    • Navigate to Visualize and create a new Controls visualization.
  2. 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.
  3. 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.

Got an article suggestion? Let us know
Explore more
Licensed under CC-BY-NC-SA

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

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 us
Writer of the month
Marin Bezhanov
Marin is a software engineer and architect with a broad range of experience working...
Build 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.com

or submit a pull request and help us build better products for everyone.

See the full list of amazing projects on github