【问题标题】:Grafana connection with elasticsearchGrafana 与 elasticsearch 的连接
【发布时间】:2017-02-02 14:20:41
【问题描述】:

我已成功创建 Grafana 和 Elasticsearch 之间的连接。我已经将数据索引到 Elasticsearch 中,但 Grafana 不想将其显示为“Singlestat”。

Elasticsearch Data Picture

Grafana Settings Picture

所以值为“104”。但是为什么 Grafana 不显示这个呢?

【问题讨论】:

    标签: elasticsearch grafana


    【解决方案1】:

    如果您想在 SigleStat 面板中显示当前值,您应该按以下方式进行:

    1. 在 Elastic 端 - 将其保存为 int,因为在 SigleStat 面板中您只能显示整数字段。

    2. 在 Grafana 端 - a。添加“电子商务”索引作为数据源(位于左上角菜单 - 数据源)。

      b.在 SigleStat 面板 - “指标”选项卡 - 选择“电子商务”数据源。

      c。在查询行中:写下“_type:supporttickets”。

      d。在 Metric 字段中 - 选择“Max”和“value”(如果 value 不是 int,您将不会在下拉列表中看到它)。

      e。在 SigleStat 面板 - “选项”选项卡 - 在“统计”下拉列表中选择“当前”。 更多选项,如阈值颜色和其他东西 - http://docs.grafana.org/features/panels/singlestat/

    【讨论】:

      【解决方案2】:

      Metric -> sum -> 正在寻找数值,但它得到一个字符串(“104”)。

      • 在 Elasticsearch 中将 "@value" 列的值插入为整数

      【讨论】:

      • 欢迎来到stackoverflow。 Stackoverflow 不是一个论坛,请保留它的结构。这更像是一个评论而不是一个答案。当您有足够的声誉时,您可以发表评论。
      猜你喜欢
      • 1970-01-01
      • 2015-10-26
      • 1970-01-01
      • 1970-01-01
      • 2017-03-09
      • 2019-01-21
      • 1970-01-01
      • 1970-01-01
      • 2017-07-26
      相关资源
      最近更新 更多