使用多个测量在带有 InfluxDB 的 Grafana 中创建视图

Using multiple measurements to create a view in Grafana with InfluxDB

在我的 Influx 中,我有两 (2) 个测量值:jenkins_datajenkins_custom_data。我想创建一个使用来自两个测量值的字段的视图。像这样:

SELECT count("build_successful") FROM "jenkins_data" WHERE "jenkins_custom_data.branch"='master' AND "build_result"='SUCCESSFUL'

注意build_successfuljenkins_data[=37中的字段=]jenkins_data中的一个标签,而branch[=34中的一个字段=]

这样的组合可以吗?

你想要做的是通过 SQL Joins 实现的,但目前 InfluxDB 不支持这个(参见 this issue 广泛讨论的地方) .

根据this comment by Anaisdg (influx staff) this will not be possible with InfluxQL, but will be possible in the future with the planned query language Flux