Grafana: global variables to access [from,to] values of the time range -
i doing tests mysql data-source , make use of timefilter inside sql query:
// query goes here... $__timefilter(time_start); which generates following:
where time_start >= from_unixtime(1505207821) , time_start <= from_unixtime(1505229421); are there variables can give me access 2 timestamps define time range?
for instance, @ example above:
from = 1505207821 = 1505229421
yes, $__timefrom() , $__timeto() if using latest 4.5.1 version of grafana (earlier versions of grafana include alpha version of mysql data source). there "show help" button under query field macros listed. see below:
the first 2 macros return , in datetime format, last 2 return them epochs.

Comments
Post a Comment