首页 新闻 会员 周边

InfluxDB OSS 2.0 支持多租户

0
悬赏园豆:200 [已解决问题] 解决于 2021-09-02 07:18

有这么干过的同学吗?求教!

手里有一个SaaS项目,为多租户设计。
由于场景需要使用时序数据库,计算使用InfluxDB,奈何官方文档里面没有详细的资料。

CHUN的主页 CHUN | 菜鸟二级 | 园豆:222
提问于:2021-09-01 08:59
< >
分享
最佳答案
0

一个用户启动一个influxdb docker实例. 棒棒得 (_)

所有数据增加一个用户的tag, 所有查询都必须跟这个tag.

收获园豆:110
czd890 | 专家六级 |园豆:14412 | 2021-09-01 11:09
其他回答(1)
0

参考 https://github.com/sitewhere/sitewhere/issues/872 中的回复:

The database name used by InfluxDB is configured as part of the InfluxDB datasource. In order to make sure a different database is used for each tenant, a placeholder is used so that the tenant token can by replaced in the name.
...
Note that the database name is [[tenant.id]] which indicates it should be replaced by the tenant id. If you were to replace the default value with a static constant, the same database would be used for all tenants, which would cause issues.

收获园豆:90
dudu | 园豆:31003 (高人七级) | 2021-09-01 12:46

另外推荐一篇园子里关于Grafana多租户的博文:Grafana中多租户设置

支持(0) 反对(0) dudu | 园豆:31003 (高人七级) | 2021-09-01 12:53

找到另外一篇参考博文 IotaWatt: Multi-Tenant Setup using InfluxDB v1

支持(0) 反对(0) dudu | 园豆:31003 (高人七级) | 2021-09-01 13:14
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册