Releases
This article documents our ongoing improvements to Cognite Data Source for Grafana.
2.5.0 - June 1, 2022
Relationships support
The connector now supports the CDF relationships resource type. You can fetch time series based on relationships in the Time series from asset tab. Use data sets, labels, and active relationships to filter the relationships based on the time filter selected in Grafana. On the new Relationships tab, use Grafana's Node Graph visualization plugin, or the new (alpha) custom visualization plugin available from the cognite-grafana-relationships-visualization GitHub repository.
Templates support (preview)
The new Templates tab lets you use the CDF templates feature (preview). You need to enable templates in the data source settings.
Using templates with Grafana lets you dynamically scale your dashboards as you add equipment. Learn more about templates.
2.4.0 - August 20, 2021
Features
- OAuth 2.0 client credentials grant flow to authenticate and authorize against CDF.
2.3.0 - June 1, 2021
Features
- Added the ability to link variables and use one variable's value as input to another. Read more.
2.2.0 - April 6, 2021
Features
- View event data in a table. Read more.
- View both fulfilled and unfinished events on a chart. Before, only fulfilled events were displayed.
- Use the new option to fetch only the latest data point for time series.
- Authenticate using OAuth with CDF. Open the data source settings and click
Forward OAuth Identityto activate this.
2.1.1 - November 23, 2020
Bug fixes:
- Fixed support for variables in the
time series by assetquery. In version 2.1.0,$variableused as anAsset tagworked for existing dashboards, but you couldn't create a new panel with the same capability.
2.1.0 - November 18, 2020
This version of data source requires Grafana version 7.0.6 or later.
Features
- Time series are now saved to dashboards by their
externalIdwhere possible. This lets you switch between CDF projects that contain time series with matchingexternalIds. - Support for synthetic time series alignment.
Other updates:
- Rewrote data source GUI to React.
- Updated CDF logo to match light/dark theme.
- Plugin source code is digitally signed and verified by
Grafana Labs.
2.0.1 - August 25, 2020
Bug fixes:
[Custom query] Option to display the legend label as a plain text instead of as expression.
Example for query:
ts{id=1} + ts{id=2} + 1:- User label
custom nameresults incustom namelabel. (No specific timeseries referenced in the label.) - User label
{{name}}results intimeseries_name_1 + timeseries_name_2 + 1label. (This works the same way as before.)
- User label
[Custom query] Improved error handling
- HTTP 500 errors messages are visible from the GUI.
[Custom query] Default granularity falls back to 1 second if a shorter value is provided.
- Before, selecting a time span of less than 10 minutes resulted in an HTTP 400 error.
2.0.0 - June 29, 2020
General improvements
- A new query language inspired by PromQL and compatible with synthetic time series in CDF. Read more.
- Support for all filtering capabilities available in CDF API v1 for the respective resource types (assets, events, times series).
- Any future filtering capabilities added to CDF API v1 will be automatically supported by the data source (filters are passed directly to CDF).
- Query expressions resulting in errors now display error messages in the UI.
- Regular expressions filtering can be used as part of the Query expression. The Filter field has been removed.
- Supports CDF API v1, with no dependency to older API versions.
- New documentation section for the connector, covering installation and administration, upgrades, feature documentation and getting started information.
- Compatibility with Grafana 7.0. Learn more about the new capabilities.
Time series and custom queries
- You can now access time series that don't have the
legacyNameattribute populated with the data source. - Setting
Root Assetin the Custom query tab is no longer required. This filter has been removed from the UI and is now available as part of a custom query expression. For example:ts{rootAssetIds=[12335453, 3455566]}. - Custom query aggregation requests are less likely to trigger rate limiting in CDF API.
- Functions:
- Support for string time series through the new
mapfunction allows you to convert string values to numeric values, which Grafana can then plot. For example:map(ts{externalId='pump_29'}, ['OPEN', 'CLOSED'], [1, 0], -1). - Use the
on_errorfunction to gain control over query calculations resolving with errors, such as division by 0. The function lets you set a default value for individual data points that resolved with errors. Without theon_errorfunction, the chart shows empty space in those places. Example:on_error(1/ts{externalId='canBeZero'}, 0). - Variable length functions:
max(x1, x2, ...),min(...),avg(...). - The
powerfunction has been renamed topow. - These functions are no longer supported:
acos,asin,atan,ceil,celing,cot,degrees,floor,log,log2,log10,radians,sign,tan,atan2,mod,truncate,rand,crc32,conv,div.
- Support for string time series through the new
- These aggregates are no longer supported by custom queries:
max,min,count,sum,continuousVariance,discreteVariance,totalVariation. - Short names for aggregation functions are no longer supported. Use full names instead:
average,interpolation,stepInterpolation. - The
timeseries{options}function has been renamed tots{options}. - Filtering:
- New options:
isString=false,externalId='my_id',id=123,externalIdPrefix='my_' - Relate to asset tree with:
assetSubtreeIds=[{id=754173880412890},{externalId="23-TE-96148"}],assetIds=[123, 234],assetExternalIds=['pump_1', 'pump_2'],rootAssetIds=[123, 234] - New range filters for create and updated time:
createdTime={min=0, max= 1593018651},lastUpdatedTime={min=1493018651, max= 1593018651} - Select time series based on dataSet membership:
dataSetIds=[{externalId='Prediction Model A'},{id=123}] pathis no longer supported- See the full list of supported filters for the
ts{}expression.
- New options:
Annotations
- New filters:
assetExternalIds,rootAssetIds,dataSetIds,externalIdPrefix,source. - Find active events in range with the
activeAtTimefilter. IfendTimeis null, the event is active fromstartTimeonwards. TheactiveAtTimefilter will match all events that are active at some point frommintomax. Example:activeAtTime={min=1591018651, max= 1593018651}. descriptionsupports only regular expression operators=~,!~, and!=.minStartTime/maxStartTimehas been replaced by thestartTime={min=0, max= 1593018651}filter.minEndTime/maxEndTimehas been replaced by theendTime={min=0, max= 1593018651}filter, enabling you to also filter for events without theendTimeset:endTime={isNull=true}.minCreatedTime/maxCreatedTimehas been replaced by thecreatedTime={min=0, max= 1593018651}filter.minLastUpdatedTime/maxLastUpdatedTimehas been replaced by thelastUpdatedTime={min=0, max= 1593018651}filter.assetSubtreeshas been replaced by theassetSubtreeIds=[{id=754173880412890},{externalId="23-TE-96148"}]filter which introduces support forId/ExternalIdinput.- These filters are no longer supported:
sort,dir,limit,offset,sourceId. - See the full list of supported filters for the
events{}expression.
Templating
- New filters:
parentIds,parentExternalIds,rootIds,dataSetIds,externalIdPrefix,root. - The
descriptionfield supports only regular expression operators=~,!~, and!=. - Select assets based on label:
labels={contains={externalId="pump"}},labels={containsAny=[{externalId="pump_type_A"},{externalId="pump_type_B"}]},labels={containsAll=[{externalId="pump"},{externalId="rust_detected"}]} assetSubtreesreplaced by theassetSubtreeIds=[{id=754173880412890},{externalId="23-TE-96148"}]filter which introduces support forId/ExternalIdinputs.minCreatedTime/maxCreatedTimehas been replaced by thecreatedTime={min=0, max= 1593018651}filter.minLastUpdatedTime/maxLastUpdatedTimehas been replaced by thelastUpdatedTime={min=1592222651, max= 1593018651}filters.- These options are no longer supported:
query,sort,dir,offset,boostname,path,depth,sourceId. - See the full list of supported filters for the
assets{}expression.
The Cognite Data Source for Grafana 2.0.0 is compatible with CDF API v1.
Cognite Data Source for Grafana 2.0.0 isn't backward compatible with dashboards created using older versions of the connector.
1.0.1 - May 27, 2019
- Rename Cognite Data Platform to Cognite Data Fusion.
- Allowing for templating variables to be used anywhere in custom queries.
- Allowing for the base URL to be modified when adding a new data source.
The Cognite Data Source for Grafana 1.0.1 is compatible with CDF API 0.5.
1.0.0 - March 26, 2019
- Fixing templating so that repeated panels/rows work properly.
- Changing checkboxes to Grafana checkboxes and adding Select all option.
- Fixing data source configuration to verify the project name.
- Breaking change:
function=inside oftimeseries{ ... }no longer works for custom queries. Instead, functions are now applied outside oftimeseries{}[]such as:(timeseries{description=~".*TEMP.*"}[avg] - 32) * 5/9sum(timeseries{name=~".*VALUE"}[count,1d])max(timeseries{metadata.on="True"}[count,5m]) - min(timeseries{metadata.on="True"}[count,5m])
The Cognite Data Source for Grafana 1.0.0 is compatible with CDF API 0.5