prometheus: Update default tsdb directory handling
authorAlex Simkin <sashasimkin@gmail.com>
Sat, 31 Jul 2021 08:43:58 +0000 (11:43 +0300)
committerPaul Spooren <mail@aparcar.org>
Thu, 9 Sep 2021 18:17:08 +0000 (08:17 -1000)
commitabf8949a2a996e0c707c62cb96885774b058fa42
treebec5fb2be9031af09a3403e895f07bd370c1fde6
parentd0fb2d7a9c796b5c3e1c297e065677d4f36b314a
prometheus: Update default tsdb directory handling

Use /srv/prometheus instead of /data, because user `prometheus` doens't
have permissions to create `/data/` in `/`.

Instead this commit puts prometheus data into `/srv/prometheus` by
default, which is a cleaner path, and it'll create tsdb path & then assign
required permissions on each prometheus service start.

This way, also, the cases when users re-configure tsdb to point to
external USB - it'll also be created and assigned required permissions for
prometheus.

Signed-off-by: Alex Simkin <sashasimkin@gmail.com>
utils/prometheus/Makefile
utils/prometheus/files/etc/init.d/prometheus
utils/prometheus/files/etc/uci-defaults/prometheus-defaults