简体   繁体   中英

grafana datasource max data points

Developing a Grafana datasource plugin is there a way to change max number of datapoints returned to panels?

Request object passed to datasource.query function is like below:

{
  "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
}

As per code comment (from docs ) maxDataPoints is decided by the panel.

No way to override this value?

You can enable maxDataPoints in query options with this setting in plugin.json :

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

This feature is not documented...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM