Closed danieleds closed 1 year ago
$to, $from, and the rest of the built-in variables, as well as any variables defined by specific dashboards are all supported. As well, if you are using the timeseries query type and your timestamp field is a standard ISODate, there is an option to inject the time filtering automatically for you.
Nice, thanks! Just started using Grafana, and I missed that.
For future reference, I was able to use the following snippet into my queries: { "$toDate": "${__from:date}" }
/ { "$toDate": "${__to:date}" }
(takes the string and performs the conversion to a Date type)
Great plugin!
I'm trying to understand how to use
from
andto
in my query.Using https://github.com/JamesOsgood/mongodb-grafana, I could use
$from
and$to
to only return the data in the time range specified by the user, but I can't seem to find an equivalent way with this plugin. Is this supported?