Infinity Filter by Datetime field

  • Grafana v10.4.0 (03f502a94d)

  • What are you trying to achieve?

I wan to filter records from backend by field with Time format, is it possible?

  • How are you trying to achieve it?

I use Infinity datasource to receive JSON records with Time field (e.g "GenerationTime": "2022-12-28T11:32:04+06:00")
My backend can’t filter by time range itself. So I hope to filter records between $__from and $__to variable values with Grafana.

  • What happened?

Neither Infinity filter, nor Transformation “Filter data by values” doesn’t allow me to do this.

  • Can you copy/paste the configuration(s) that you are having problems with?

JSON sample: https://pastebin.com/raw/CnEsiG5N

I added JSON sample for tests on pastebin: https://pastebin.com/raw/CnEsiG5N

Correct UQL code for this code is:

parse-json
| where "GenerationTime" >= '${__from:date}'

Thx, @yosiasz

1 Like