Cognite Grafana plugin does not support handling cursor API responses

Related products: API and SDKs

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:

  1. 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.
  2. 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.

  1. Assuming this is about the variables created with asset queries; A dropdown with >1000 items will be very hard to navigate. Having more items will also make it slow.  Is it possible to filter the assets to make the list of assets shorter? 
  2. Displaying more than 1000 timeseries in one small widget will be hard to read and take time to calculate (slow). Does it make sense from the user’s perspective? We recommend splitting the time series into multiple widgets.

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:

  • 10 expressions (10 synthetic time series).
  • 10.000 data points, summed over all expressions.
  • 100 input time series referrals, summed over all expressions.
  • 2000 tokens in each expression. Similar to 2000 characters, except that words and numbers are counted as a single character.

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.


NewGathering Interest