抱歉,您的浏览器无法访问本站

本页面需要浏览器支持(启用)JavaScript


了解详情 >

安装prometheus

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ brew install prometheus

==> Downloading https://homebrew.bintray.com/bottles/prometheus-2.25.2.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/3ebbcb9f2988c8663d54b7582c8934656c6f1c6f80e43b8a9071d74298bc5d90?response-content-disposition=attachment%3Bfilename%3D%22prometheus-2.25.2.big_su
######################################################################## 100.0%
==> Pouring prometheus-2.25.2.big_sur.bottle.tar.gz
==> Caveats
When run from `brew services`, `prometheus` is run from
`prometheus_brew_services` and uses the flags in:
/usr/local/etc/prometheus.args

To have launchd start prometheus now and restart at login:
brew services start prometheus
Or, if you don't want/need a background service you can just run:
prometheus --config.file=/usr/local/etc/prometheus.yml
==> Summary
🍺 /usr/local/Cellar/prometheus/2.25.2: 21 files, 156.4MB
==> `brew cleanup` has not been run in 30 days, running now...
Pruned 0 symbolic links and 54 directories from /usr/local

启动:

1
prometheus --web.listen-address="0.0.0.0:9040" --config.file=/usr/local/etc/prometheus.yml

安装brew install grafana

1
2
3
4
5
6
7
8
9
10
11
12
$ brew install grafana
==> Downloading https://homebrew.bintray.com/bottles/grafana-7.5.1.big_sur.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/9aa51026c2292a6e18d2a678396f35508404cd79e06e5fcc797bd3431c039b40?response-content-disposition=attachment%3Bfilename%3D%22grafana-7.5.1.big_sur.bo
######################################################################## 100.0%
==> Pouring grafana-7.5.1.big_sur.bottle.tar.gz
==> Caveats
To have launchd start grafana now and restart at login:
brew services start grafana
Or, if you don't want/need a background service you can just run:
grafana-server --config=/usr/local/etc/grafana/grafana.ini --homepath /usr/local/share/grafana --packaging=brew cfg:default.paths.logs=/usr/local/var/log/grafana cfg:default.paths.data=/usr/local/var/lib/grafana cfg:default.paths.plugins=/usr/local/var/lib/grafana/plugins
==> Summary
🍺 /usr/local/Cellar/grafana/7.5.1: 2,663 files, 179.5MB

浏览器访问http://localhost:3000就可以看到Grafana页面

评论