Grafana
GreptimeDB 服务可以配置为 Grafana 数据源。
Prometheus
单击 Add data source 按钮,然后选择 Prometheus 作为类型。
在 HTTP 中填写 Prometheus server URL
在 Auth 部分中单击 basic auth,并在 Basic Auth Details 中填写 GreptimeDB 的用户名和密码:
- User: <username>
- Password: <password>
在 Custom HTTP Headers 部分中点击 Add header:
- Header: x-greptime-db-name
- Value: <dbname>
然后单击 Save & Test 按钮以测试连接。
MySQL
单击 Add data source 按钮,然后选择 MySQL 作为类型。在 MySQL Connection 中填写以下信息:
- Host: <host>:4002
- Database: <dbname>
- User: <username>
- Password: <password>
- Session timezone: UTC
然后单击 Save & Test 按钮以测试连接。
注意目前我们只能使用 SQL 创建 Grafana Panel。由于时间戳数据类型的区别,Grafana 的 SQL Builder 暂时无法选择时间戳字段。