mac安装Prometheus+Grafana

安装Prometheus
  • 通过homebrew安装
brew install prometheus

==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/prometheus-2.36.0.a
curl: (22) The requested URL returned error: 404

Warning: Bottle missing, falling back to the default domain...
==> Downloading https://ghcr.io/v2/homebrew/core/prometheus/manifests/2.36.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/prometheus/blobs/sha256:06cd043
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Pouring prometheus--2.36.0.arm64_monterey.bottle.tar.gz
==> Caveats
When run from `brew services`, `prometheus` is run from
`prometheus_brew_services` and uses the flags in:
   /opt/homebrew/etc/prometheus.args

To restart prometheus after an upgrade:
  brew services restart prometheus
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/prometheus/bin/prometheus_brew_services
==> Summary
🍺  /opt/homebrew/Cellar/prometheus/2.36.0: 22 files, 198.8MB
==> `brew cleanup` has not been run in the last 30 days, running now...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/admin/Library/Logs/Homebrew/gmp... (64B)
Removing: /Users/admin/Library/Logs/Homebrew/mpfr... (64B)
Removing: /Users/admin/Library/Logs/Homebrew/gcc... (64B)
Removing: /Users/admin/Library/Logs/Homebrew/gettext... (64B)
Removing: /Users/admin/Library/Logs/Homebrew/zstd... (64B)
Removing: /Users/admin/Library/Logs/Homebrew/isl... (64B)
Removing: /Users/admin/Library/Logs/Homebrew/pcre2... (64B)
Removing: /Users/admin/Library/Logs/Homebrew/git... (64B)
Removing: /Users/admin/Library/Logs/Homebrew/libmpc... (64B)
Pruned 0 symbolic links and 2 directories from /opt/homebrew
  • 启动prometheus
brew services start prometheus

==> Tapping homebrew/services
Cloning into '/opt/homebrew/Library/Taps/homebrew/homebrew-services'...
remote: Enumerating objects: 2038, done.
remote: Counting objects: 100% (547/547), done.
remote: Compressing objects: 100% (199/199), done.
remote: Total 2038 (delta 372), reused 467 (delta 339), pack-reused 1491
Receiving objects: 100% (2038/2038), 558.36 KiB | 908.00 KiB/s, done.
Resolving deltas: 100% (927/927), done.
Tapped 1 command (45 files, 711.4KB).
==> Successfully started `prometheus` (label: homebrew.mxcl.prometheus)
  • 查看链接
http://localhost:9090/
  • 重启prometheus
brew services restart prometheus
安装Grafana
  • 通过brew进行安装
 brew install grafana
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/grafana-8.5.4.arm64
curl: (22) The requested URL returned error: 404

Warning: Bottle missing, falling back to the default domain...
==> Downloading https://ghcr.io/v2/homebrew/core/grafana/manifests/8.5.4
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/grafana/blobs/sha256:16df2ad222
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Pouring grafana--8.5.4.arm64_monterey.bottle.tar.gz
==> Caveats
To restart grafana after an upgrade:
  brew services restart grafana
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/grafana/bin/grafana-server --config /opt/homebrew/etc/grafana/grafana.ini --homepath /opt/homebrew/opt/grafana/share/grafana --packaging=brew cfg:default.paths.logs=/opt/homebrew/var/log/grafana cfg:default.paths.data=/opt/homebrew/var/lib/grafana cfg:default.paths.plugins=/opt/homebrew/var/lib/grafana/plugins
==> Summary
🍺  /opt/homebrew/Cellar/grafana/8.5.4: 5,964 files, 237.8MB
==> Running `brew cleanup grafana`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
  • 启动grafana
brew services start grafana
==> Successfully started `grafana` (label: homebrew.mxcl.grafana)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

乐观的Terry

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值