Hi,
We are working on building grafana dashboard for all assets connected to specific root asset using cognite grafana plugin.
BUT, It seems like Cognite Grafana plugin does not support handling cursor API responses. Due to this limitation, we see following challenges:
- CDF “Filter assets” api can return max 1000 assets only in a request. This may result into displaying 1000 asset’s data only if we have more than 1000 assets.
- CDF “Filter time series” api can return max 1000 timeseries only in a request. This may result into displaying partial data only on widgets if total number of timeseries is more than 1000 for all assets coming under selected hierarchy.
This is major blocker for us.
Hello,
The Cognite Grafana plugin doesn’t do cursor API queries basically due to user friendliness and performance.
Taking about 2 point,
This is how we are passing query under “timeseries custom query” option in cognite grafana plugin.
ts{assetSubtreeIds=[{id=$Org4}], name='oil-production-rate'}
where value of $Org1 is coming from dashboard variable.
and since we want to calculate monthly Average, we are passing aggregation: ‘Average’ and granularity: ‘30d’.
Expected: Display Average of all ‘oil-production-rate’ timeseries for all assets connected to $Org4.
Actual: Now due to this limitation of grafana plugin where it does not support cursor API responses, it will calculate average only for 1000 timeseries and we are ending up displaying wrong average on widget since we are having total more than 1000 ‘oil-production-rate’ timeseries for all assets connected to that $Org4.
There is a limit on synthetic time series as well, so even though if the Grafana plugin would fetch >1000 time series to do the average over it would not work with your current design.
avg(ts{assetSubtreeIds=xxx})
https://docs.cognite.com/dev/concepts/resource_types/synthetic_timeseries/
In a single request, you can ask for:
You will reach multiple of these limitations.
The current recommendation is to create a Cognite Function that creates the average across the subtree and write the result to a new time series you can visualize in Grafana.
In addition, we could move your current request into a feature request.