Prometheus安装使用

#下载
#安装
[root@localhost ~]# tar zxf prometheus-2.16.0-rc.0.linux-amd64.tar.gz -C /usr/local/
[root@localhost ~]# cd /usr/local/
[root@localhost local]# mv prometheus-2.16.0-rc.0.linux-amd64 prometheus
[root@localhost local]# cd prometheus/
[root@localhost prometheus]# ./prometheus --version
#后台运行普罗米修斯
[root@localhost prometheus]# ./prometheus &
 
浏览器访问:http://192.168.10.121:9090/graph端口,默认读取当前目录下的prometheus.yml配置文件
#编写启动服务
[root@localhost system]# vim /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus Monitoring System
Documentation=Prometheus Monitoring System
 
[Service]
ExecStart=/usr/local/prometheus/prometheus \
--config.file=/usr/local/prometheus/prometheus.yml \
--web.listen-address=:9090
 
[Install]
WantedBy=multi-user.target
 
#启动服务
[root@localhost system]# systemctl enable prometheus
[root@localhost system]# systemctl start prometheus
[root@localhost system]# ss -tunlp|grep 9090
 
 
 
 

posted @ 2020-11-20 12:34  python坚持者  阅读(402)  评论(0编辑  收藏  举报