Closed edjeffreys closed 5 years ago
On what version of grafana and prtg does this appear to not work?
Sent from my iPhone
On Jul 12, 2019, at 10:03 AM, Ed Jeffreys notifications@github.com wrote:
Currently getting around by hard-coding the passhash in dist/datasource.js Line 56: this.passhash = instanceSettings.jsonData.prtgApiPasshash; to this.passhash = 123456;
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Grafana v6.2.5 PRTG v19.2 Grafana PRTG plugin v4.0.3
The passhash doesn't seem to populate correctly. According to the URL in chrome network tools; the passhash parameter in the URL populates with [object%20Object] instead of the actual passhash value.
Interestingly; the first call Grafana makes seems to fill the passhash correctly; but every subsequent one does not fill.
I have tried different cache timeouts etc. with no success.
Hello I have same problem on my grafana.
Grafana v6.2.1 PRTG 19.1.49.1966 Grafana PRTG v4.0.3
And many thanks @edjeffreys for the work around.
Having the same issue is there a work around?
Currently getting around by hard-coding the passhash in dist/datasource.js Line 56:
this.passhash = instanceSettings.jsonData.prtgApiPasshash;
tothis.passhash = 123456;
This did the trick for me.
Oh man I'm blind, thanks!
That solution didn't work for me, the issue was on line 169 of dist/PRTGAPIService.js - it overrides the passhash with the response for some reason. Commenting it out fixed it for me.
//_this.passhash = response;
@MIKI785 well spotted! That's a nicer fix.
DO NOT HARD CODE A PASSWORD INTO THE SCRIPT!
Especially if you're using Direct/browser access!
Currently the same lines of code produces the same error in grafana 8.4.1
https://grafana.....de/api/datasources/proxy/1/table.json?username=prtgadmin&passhash=[object%20Object]&content=groups&count=9999&columns=objid,group,probe,tags,active,status,message,priority
See &passhash=[object Object]
in the request.
The issue still exists in the plugin
Currently getting around by hard-coding the passhash in dist/datasource.js Line 56:
this.passhash = instanceSettings.jsonData.prtgApiPasshash;
tothis.passhash = 123456;