grafana - 使用 Elastic Search 在 Grafana 中进行模板化

标签 grafana

我想将 Grafana 中的模板功能与 Elasticsearch 结合使用来创建一组“动态”术语(“应用程序”)

要从我正在使用的elasticsearch 获取术语列表:

{
 "aggs" : 
  { 
    "applications" : {
      "terms" : { "field" : "businessTransactions.application" }
    }
  }
}

当我在模板查询变量设置中使用该查询时,Grafana 查询告诉我:“模板变量无法初始化:无法读取未定义的属性“then””

我使用的是grafana 3.1.0beta1

也许我完全不知道,但是有人如何使用查询从elasticsearch获取字段的不同术语作为模板变量?

谢谢!

最佳答案

第一个问题:您使用的是哪个版本的 Grafana?抱歉,刚刚重新阅读并看到了答案,即 3.1.0beta1。

以下内容适用于我的 3.1.0(非测试版)。

第二个问题:您看到这个页面了吗:http://docs.grafana.org/datasources/elasticsearch/

Templating

The Elasticsearch datasource supports two types of queries you can use to fill template variables with values.

Possible values for a field {"find": "terms", "field": "@hostname"}

Fields filtered by type {"find": "fields", "type": "string"}

Fields filtered by type, with filter {"find": "fields", "type": "string", "query": <lucene query>}

Multi format / All format

关于grafana - 使用 Elastic Search 在 Grafana 中进行模板化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38040890/

相关文章:

influxdb - Grafana/InfluxDB查询具有时间范围的计数器数据

monitoring - 范围向量的普罗米修斯联合

docker - Kamon、Statsd、Grafana 磁盘空间

go - Grafana/Prometheus 将多个 ip 可视化为查询

elasticsearch - 我可以只使用elasticsearch来使用Grafana吗?

IIS在应用程序池回收期间重新启动

prometheus - 将 Prometheus 计数器绘制为 Grafana 中的事件数

python - 无法通过 Grafana API 导入 grafana 仪表板

postgresql - 从 grafana 连接到 postgresql

kubernetes - 普罗米修斯数据源: client_error: client error: 403