2018-02-10 20:38:21 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
[ -e /etc/config/prometheus ] || touch /etc/config/prometheus
|
|
|
|
|
|
|
|
uci -q get prometheus.prometheus || {
|
|
|
|
uci -q batch <<EOF
|
|
|
|
set prometheus.prometheus=prometheus
|
|
|
|
set prometheus.prometheus.config_file='/etc/prometheus.yml'
|
2021-07-31 10:43:58 +02:00
|
|
|
set prometheus.prometheus.storage_tsdb_path='/srv/prometheus'
|
2018-02-10 20:38:21 +01:00
|
|
|
set prometheus.prometheus.web_listen_address='127.0.0.1:9090'
|
|
|
|
commit prometheus
|
|
|
|
EOF
|
|
|
|
}
|