Search code examples
elasticsearchkibanagrafanamonitoringdashboard

how to correctly use kql operators ( =, >, >= ) in Grafana


Right now I'm trying to transfer some old dashboards from kibana to Grafana 8.5+

Dashboards in kibana use filters for some mappings. For example we have some event: "JOB_STARTED" and this event comes with additional field total_time: (time in milliseconds).

So in kibana we have the ability to sort by some time. For example event: "JOB_STARTED" AND total_time >= 10000. As a result we will get the number of such logs.

But in grafana as soon as I specify AND total_time >= 10000. The chart goes empty (or rather all of its values are zero). Whereas when you discovery the logs in kibana you see the exact number.

I couldn't find any solution. Maybe there is another way to filter or the operators ( =, >, >= ) are not normally supported in the grafana.


Solution

  • just use [n TO N]. For example, in my case:

    AND total_time: [10 TO 100]