文章目录
如果你还没有安装prometheus,请先查看: prometheus的介绍及安装
web端的基本使用及介绍
http:.//ip:9090
查看监控目标:
可以看到系统默认监控了自己的主机信息,监控接口通过http://服务器IP:9090/metrics 可以直接看到监控数据,如下图:
第一张图中的localhost:9090/metrics中的localhost要改成自己的ip
这里面是prometheus开放的接口。
prometheus默认监控图像
在图1的位置输入process_cpu_seconds_total ,可以查看到cpu的使用情况。
案例: 监控远程linux主机
首先在远程linux上安装node_export组件,帮助prometheus来收集