VictoriaMetrics-Community / homeassistant-addon-victoriametrics

VictoriaMetrics Add-on for Home Assistant OS is the perfect solution for long term data storage of your smart home sensor data and visualization with Grafana.
MIT License
95 stars 24 forks source link

Map the Home Assistant config directory to the add-on container #29

Closed falzm closed 8 months ago

falzm commented 1 year ago

Hi 👋 Would you consider adding the Home Assistant global config directory to the mapping of your add-on container? In this PR I've introduced the ability to pass extra command line arguments such as -promscrape.config=FILE, which allows using alternative Prometheus server configuration – however at the moment it isn't possible to pass a file via the global /config Home Assistant directory. Even a read-only mapping would suffice in this case.

Basically, you'd have to add - config to the map: attribute of your config.yaml add-on file: https://github.com/fuslwusl/homeassistant-addon-victoriametrics/blob/main/victoria-metrics/config.yaml#L19

fuslwusl commented 1 year ago

Thanx for your PR. I think adding the config folder could lead to a security issue. At the moment victoriametrics has only access to the share folder because there should not contain any secrets. But the config folder contains sensible stuff and i wanted to avoid this. Maybe you could put the promscrape-config to the share folder as some sort of workaround?!

andyfr commented 1 year ago

I would be interested in changing the prometheus.tpl as well, share folder sounds totally fine for me. If I can help with something let me know. @falzm where can I find your PR? There is currently none open and I can't find something related in the closed PRs.

falzm commented 1 year ago

@andyfr here: #24

fuslwusl commented 8 months ago

@falzm Thanx for your help!