We have a Grafana instance that is currently connected to MySQL data source, this query is being executed
SELECT
time AS "time",
videoid AS "metric",
sum(mbytes) AS "mbytes",
CONCAT(`video_url`, '', videoid) AS url,
video_title as title
FROM topvideos
WHERE
$__unixEpochFilter(time)
GROUP BY videoid,2
ORDER BY time
LIMIT 10
We want to transition from a MySQL data source to a rest API data source via the infinity plugin.
Therefore we would want Grafana to be able to call our API and send it a start and an end time. We have two questions:
-
How does
__unixEpochFilter
translate into a MySQL query?Where time between a and b
? -
How to get a start and end time to send it in an API call? Do I have access to them as variables I can use or do I only have access to
__unixEpochFilter
?