Prometheus的安装

Prometheus 是由 SoundCloud 开源监控告警解决方案,可以针对已部署的服务进行状态的监控,若服务下线可即使进行告警。

首先去官网下载一个Prometheus的压缩包。

https://prometheus.io/download/

将压缩包放在准备好的服务器上。

tar -zxvf xxxxxxx(将压缩包解压)

进入解压后的文件夹内。

vim prometheus.yml(进入配置文件)

如图所示将prometheus的信息写入该配置文件内,马赛克处为prometheus所在服务器的IP地址。
Prometheus的安装

退出后启动prometheus

./ prometheus &(直接启动)

nohup ./prometheus &(后台启动)

pkill prometheus(停止服务,若之前已启动,可先关闭之前的再进行启动,否则会提示端口占用从而启动失败)

在网页中输入http://服务器IP:9090即可访问prometheus页面。
Prometheus的安装

上一篇:JAVA IO - 获取类路径


下一篇:Prometheus在SinoRepl监控的应用