Skip to content

Use Mysql In Grafana

原文链接

将mysql当成TSDB来使用

SELECT
  title as 'Title',
  user.login as 'Created By' ,
  dashboard.created as 'Created On'
 FROM dashboard
INNER JOIN user on user.id = dashboard.created_by
WHERE $__timeFilter(dashboard.created)

Another option is a query that can create a key/value variable. The query should return two columns that are named __text and __value

在sql的基础上,掺杂了一些自定义的time函数,来支持TSDB