- Notifications
You must be signed in to change notification settings - Fork26
The Trino datasource allows to query and visualize Trino data from within Grafana.
License
trinodb/grafana-trino
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The Trino datasource allows to query and visualizeTrino data from within Grafana.
Drop this into Grafana'splugins directory. To run it locally without installing Grafana, run it in a Docker container using:
docker run -d -p 3000:3000 \ -v"$(pwd):/var/lib/grafana/plugins/trino" \ -e"GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=trino-datasource" \ --name=grafana \ grafana/grafana-oss
- Authentication:
- HTTP Basic
- TLS client authentication
- Access token (JWT)
- OAuth
- Raw SQL editor only, no query builder yet
- Macros
- Client tags support, used to identify resource groups.
Plugin supports the following marcos:
$timeFrom($column)- replaced with the lower boundary of the currently selected "Time Range" as a timestamp.$timeTo($column)- replaced with the upper boundary of the currently selected "Time Range" as a timestamp.$timeGroup($column, $interval)- replaced with an expression that rounds values of a columnto the selected "Group by a time interval" value.$dateFilter($column)- replaced with a range condition for the currently selected "Time Range" as dates,on a column passed as the $column argument. Use it in queries or query variablesas...WHERE $dateFilter($column)...or...WHERE $dateFilter(created_at).....$timeFilter($column)- replaced with a range condition for the currently selected "Time Range" as timestamps,on a column passed as the $column argument.$unixEpochFilter($column)- replaced with a range condition for the currently selected "Time Range",on a column passed as the $column argument.$parseTime- parse a timestamp string using the default or specified format.
A description of macros is available by typing their names in Raw Editor
Template variable values are only quoted when the template variable is amulti-value.
If the variable is a multi-value variable then use theIN comparison operatorrather than= to match against multiple values.
Example with a template variable named hostname:
SELECT atimestampastime, aintas valueFROM tableWHERE $__timeFilter(atimestamp)and hostnamein($hostname)ORDER BY atimestampASC
Grafana automatically creates a quoted, comma-separated string for multi-value variables.For example: ifserver01 andserver02 are selected then it will be formatted as:'server01', 'server02'. To disable quoting, use thecsv formatting option for variables:
${servers:csv}Read more about variable formatting options in theVariables documentation.
If you have any idea for an improvement or found a bug do not hesitate to open an issue or submit a pull request.We will appreciate any help from the community.
SeeDEVELOPMENT.md for development instructions.
Apache 2.0 License, please seeLICENSE for details.
About
The Trino datasource allows to query and visualize Trino data from within Grafana.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors15
Uh oh!
There was an error while loading.Please reload this page.