Many thanks to JetBrains for providing the OS license for an amazing GoLand IDE.
dist
folder to your Grafana plugin directoryThe plugin is unsigned, hence you may face the error:
lvl=eror msg=“Failed to load plugin” logger=plugins error=“plugin “grafana-csv-plugin” is unsigned”
To get it to work you should make configuration as described in documentation
my_data
, hence in a query you should select from my_data
table)Macros | Description |
---|---|
$__timeFilter(dateColumn) | Will be replaced by a time range filter using the specified column name. For example, dateColumn BETWEEN ‘2017-04-21T05:01:17Z’ AND ‘2017-04-21T05:06:17Z’ |
$timeGroup(dateColumn, interval), Examples: `sec: $timeGroup(dateColumn, 60); min: $timeGroup(dateColumn, 60m); hour: $timeGroup(dateColumn, 1h)` | Will be replaced by an expression usable in a GROUP BY clause. For example, datetime((strftime('%s', dateColumn) / 60) * 60, 'unixepoch') |
$__unixEpochFrom() | Will be replaced by the start of the currently active time selection as Unix timestamp. For example, 1494410783 |
$__unixEpochTo() | Will be replaced by the end of the currently active time selection as Unix timestamp. For example, 1494497183 |
Example:
jan_2006
SELECT $__timeGroup(cdatetime, 1h) as "time", district as "metric", count(*) as "value"
FROM
jan_2006
WHERE
$__timeFilter(cdatetime)
GROUP BY "time", "metric"
ORDER BY "time"
Example:
sales
SELECT $__timeGroup(Transaction_date, 24h) as "time", Payment_Type as "metric", count(*) as "value"
FROM
sales
GROUP BY "time", "metric"
ORDER BY "time"
http://your-server:3000 (admin/admin)
manage.sh build
(build docker image)manage.sh up
(run container)manage.sh down
(stop container)After starting container go to the showcase dashboard: http://your-host:3000/d/DTRcLsVGk/showcase-sales?orgId=1