I was attempting to install the SQLDB plugin (to make my Grafana installation work with Postgresql), but I couldn’t and noticed in the console a file was being attempted to load - module.js. It was missing from the plugin directory, obviously, and checked the other plugin directories to see why they work and this one doesn’t. It checks out, module.js was simply missing, so I decided to attempt to install your example datasource plugin:
However, even there the module.js file is simply missing, and the documentation is being rather vague about the module.js file (or perhaps it’s simply because I have never worked with such an environment before, hmmm…) - or rather, files… Apparently these files are the entry point of the plugin, but what I do wonder is why are they missing from the example plugin, even? Do I need to build it myself somehow? If so, I’m rather short of time at the moment, because I’m nearing my deadline - I do not have time to investigate all the necessary steps. I was hoping it’d be a drag-and-drop process (of course, things never work out that easily )
Anyhow, I’m sorry if this question has been answered before or if it’s a rookie question. You have my thanks for reading this far either way!
I installed both plugins manually by downloading their respective github projects as a .zip file, then extracting them into the plugins folder. I should state me attempting to install SimpleJSON was merely a test.
It seems the system was attempting to load the files from the root of the plugin, unless this is intended behaviour and I’m using an older version or something, hence the file disrespecancies. So it did have the module.js all along, I was confused by the other plugins that had the module.js, along with the other files, in the root folder.
Seems like copying the files from /dist to the root of the plugin folder “”“worked”"", because the plugin is properly loading, at the very least. I suppose this is an extremely crude solution though, because now I am getting the following error when attempting to save the new data source:
Unknown error
Cannot read property ‘indexOf’ of undefined
All the browser console spits out is the following:
boot.js:42 POST http://localhost:8080/api/datasources/proxy/2/query 502 (Bad Gateway)
I’m confused at this, because the error I am receiving from the Grafana interface does not appear to be related to the browser console error at all. Or perhaps it is due to the Bad Gateway… time to investigate my configuration.
I guess my installation is held together by rope and duct tape at this point…
Bah, I feel so stupid right now.
I should state that I can send data to my PostgresDB, because I’m using a Node-RED installation that is connected to the database. The last row was created at 16:47:06, which as of writing is 30 seconds ago. Why Grafana has trouble connecting to the database… I simply have no idea.
Sorry, I don’t really know. It is not a published plugin (and therefore has never been reviewed by anyone on the Grafana team) - so I have never used it. Maybe you can submit an issue to their GitHub repo.
Grafana loads the files in the dist folder if it exists otherwise it loads the files from the plugin root. So your solution of just copying in the dist files should work fine in theory.
I decided to retry InfluxDB again, and now it’s all good. Thank you for your support - really appreciate the quick responses! Keep up the good work, guys