代码之家  ›  专栏  ›  技术社区  ›  moose

grafana数据源最大数据点

  •  4
  • moose  · 技术社区  · 7 年前

    开发Grafana数据源插件有没有办法更改返回到面板的最大数据点数?

    请求对象传递给 数据源。查询 功能如下:

    {
      "range": { "from": "2015-12-22T03:06:13.851Z", "to": "2015-12-22T06:48:24.137Z" },
      "interval": "5s",
      "targets": [
        { "refId": "B", "target": "upper_75" },
        { "refId": "A", "target": "upper_90" }
      ],
      "format": "json",
      "maxDataPoints": 2495 //decided by the panel
    }
    

    根据代码注释(来自 docs ) maxDataPoints 由专家组决定。

    无法覆盖此值?

    1 回复  |  直到 7 年前
        1
  •  4
  •   beaver    7 年前

    您可以启用 maxDataPoints 在查询选项中使用此设置 plugin.json :

    "queryOptions": {
       "maxDataPoints": true
    },
    

    此功能未记录。。。