如果 prometheus 在 mac 上作为服务运行,如何更新它的配置文件?

sur*_*kad 3 grafana prometheus

如果 prometheus 在 mac 上作为服务运行,如何更新 prometheus.yml 文件?请分享在 mac 上更新 prometheus prometheus.yml 文件的命令。

Mal*_*ite 7

如果你用brew安装了prometheus,并运行brew services start prometheus 你可以编辑其中的配置文件/usr/local/etc/prometheus.yml,然后你可以用命令重新启动prometheusbrew services restart prometheus


Kyl*_*and 7

我的配置文件位于不同的目录中:/opt/homebrew/etc/prometheus.yml

安装后有一些帮助文本,说明参数在此处设置/opt/homebrew/etc/prometheus.args

args 有一个配置文件所在位置的键:

--config.file /opt/homebrew/etc/prometheus.yml
--web.listen-address=127.0.0.1:9090
--storage.tsdb.path /opt/homebrew/var/prometheus
Run Code Online (Sandbox Code Playgroud)