grafana-prtg icon indicating copy to clipboard operation
grafana-prtg copied to clipboard

PanelQueryRunner Error TypeError: dateMath.parse is not a function

Open nevesing opened this issue 4 years ago • 6 comments

I recently upgraded to Grafana 6.7.1 and I am getting below error for PRTG datasource. Please help.

PanelQueryRunner Error TypeError: dateMath.parse is not a function
    at PRTGDataSource.query (datasource.js:64)
    at runRequest.ts:152
    at j (runRequest.ts:102)
    at e.<anonymous> (PanelQueryRunner.ts:153)
    at s (runtime.js:45)
    at Generator._invoke (runtime.js:271)
    at Generator.forEach.t.<computed> [as next] (runtime.js:97)
    at b (app.71af4420a0fca6a7ffc6.js:2)
    at i (app.71af4420a0fca6a7ffc6.js:2)

nevesing avatar Mar 22 '20 21:03 nevesing

I've the same issue after upgrading from 6.6 to 6.7. It's possible to create query (searching for Metrics) but no content will be shown.

kurekr avatar Mar 23 '20 09:03 kurekr

This may be related to the change mentioned in the release notes. For 6.6 and 6.7

Notice about upcoming changes backendSrv for plugin authors
In our mission to migrate away from AngularJS to React we have removed all AngularJS dependencies in the core data retrieval service
backendSrv . This change is already in master and will be introduced in the next major Grafana release.
Removing the AngularJS dependencies in backendSrv has the unfortunate side effect of AngularJS digest no longer being triggered for
any request made with backendSrv. Because of this, external plugins using backendSrv directly may suffer from strange behaviour in
the UI.
To remedy this issue as a plugin author you need to trigger the digest after a direct call to backendSrv.

Example:

backendSrv.get('http://your-url/api').then(result => {
this.result = result;
this. $scope. $digest();
});

jeremyroche-er avatar Mar 23 '20 13:03 jeremyroche-er

yep, same issue here. 6.7 is not compatible with prtg plugin

olsonnn avatar Mar 25 '20 08:03 olsonnn

Can confirm that the latest "master" ist not working with 6.6 and 6.7

saruter avatar Mar 27 '20 14:03 saruter

Looks like it's working fine again in 6.7.2!

olsonnn avatar Apr 16 '20 06:04 olsonnn

Yes it is working now

nevesing avatar Apr 16 '20 18:04 nevesing