fr-ser / grafana-sqlite-datasource

Grafana Plugin to enable SQLite as a Datasource
Apache License 2.0
123 stars 17 forks source link

Allow usage of a remote database file - Grafana Cloud #102

Closed lnxslck closed 1 year ago

lnxslck commented 1 year ago

This datasource doesnt work in Grafana Cloud, since you cant upload your database. Update the current datasource to allow the usage of a remote database, for example connection to an S3 bucket or other remote location. That way people would be able to use Grafana Cloud + Sqlite

fr-ser commented 1 year ago

I am not sure there are that many use cases that would benefit from such a feature. Most users of SQLite and this database have a frequently updating database. Copying that over to S3 and then the plugin downloading that database would be a bit convoluted.

I guess an easy way would be to add a "public link" option, that would download the database from this link. But how many people would want to make their database publically available (does not sound secure and I don't want to encourage that). Offering authentication would again be heavily use case dependant. I don't want to add auth for AWS, Google Cloud, Azure and then more and more auth mechanism just for a download feature, which should be an exception...

fr-ser commented 1 year ago

Maybe you could explain your own use case a bit more to help me understand. Where is your SQLite currently? And why is Grafana Cloud a requirement?

lnxslck commented 1 year ago

Grafana now offers a free Cloud tier, which is more than enough for personal and small projects. Sqlite is a great database if you're not doing any heavy work on the database. Having the chance to work with Grafana cloud and a sqlite "cloud" version would be great.

fr-ser commented 1 year ago

Sadly there is no SQLite cloud version. In such a case I would recommend going for a real server-based database (like Postgres) or just running Grafana on the raspberry as well.

Of course, I wouldn't mind if somebody added this feature on the plugin but I don't see a good approach for that yet.

lnxslck commented 1 year ago

Thanks for taking the time to answer. It was more like a nice to have feature.

valankar commented 3 months ago

It would be great to allow a http address for the database. The CSV plugins seems to allow that:

https://grafana.com/docs/plugins/marcusolsson-csv-datasource/latest/configuration/#allow-local-mode

I understand it isn't for most use cases. For me I have a rather small SQLite database updated hourly and having the feature would be great.

fr-ser commented 1 week ago

I would recommend opening a new issue/feature request for this and then we can discuss details.

The details (how to access the database, authentication, update interval, etc.) are what is the main issue after all.