美文网首页
prometheus一文就够

prometheus一文就够

作者: xhrg | 来源:发表于2020-03-26 10:22 被阅读0次

一、介绍(这个玩意是干啥的)

  • prometheus 可以用来做监控。比如应用的请求次数,请求的时间长度,绘制各种报表。一般prometheus的浏览器界面非常简陋,需要配合gramefa使用。

二、用户使用

三、环境搭建和高可用

3.1 最简单的环境搭建

1. brew install prometheus ##安装prometheus
2. cd /usr/local/etc   ##目录
3. prometheus --config.file=prometheus.yml ##启动后访问 http://localhost:9090/graph
4. 在prometheus.yml中能看到scrape_configs的static_configs的targets配置的是一个数组,比如我追加"localhost:9080",那么我启动的业务应用就可以暴露一个 http://localhost:9080/metrics 给他拉监控数据。
5. brew install grafana ##安装grafana
6. brew services start grafana  ##启动后访问 localhost:3000,首次密码是admin/admin
7. 进入grafana配置datasource,对接http://localhost:9090就可以配置成功了对接prometheus

四、网络文章

相关文章

网友评论

      本文标题:prometheus一文就够

      本文链接:https://www.haomeiwen.com/subject/ybuquhtx.html