hassio-addons / addon-grafana

Grafana - Home Assistant Community Add-ons
https://addons.community
MIT License
221 stars 61 forks source link

Add maps to HA folder #133

Closed bertouttier closed 3 years ago

bertouttier commented 3 years ago

Problem/Motivation

I have a sqlite database in the config folder that I would like to add as a data source in Grafana. However, the HA config folder is not mapped in the Grafana container.

Expected behavior

Allow mapping HA folders in the Grafana addon container.

Actual behavior

Currently, it is not possible when I look at the config.json.

Steps to reproduce

I installed the grafana plugin "frser-sqlite-datasource" and tried to add a sqlite datasource using the path "/config/db.sqlite", but off course, this path does not exist in the grafana container.

Proposed changes

I would add the following to the config.json:

"map": [
    "config:rw",
    "ssl:rw",
    "addons:rw",
    "media:rw",
    "share:rw",
    "backup:rw"
  ],
frenck commented 3 years ago

I would allow for adding just read access to the config folder for this use case, but the others I don't see the use for? Could you clarify the reason to add all those with write access?

bertouttier commented 3 years ago

You are right, in my case it is enough to do what you suggest. I leave it up to you to decide what you think is the best thing to do here :)