码迷,mamicode.com
首页 > 其他好文 > 详细

prometheus监控

时间:2021-04-06 14:27:18      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:监控   tor   可视化   not   start   monit   iptables   sys   RoCE   

部署prometheus监控端
mkdir /opt/monitor/
[root@zabbix ~]# tar -xf prometheus-2.25.0.linux-amd64.tar.gz -C /opt/monitor/
[root@zabbix ~]# mv prometheus-2.25.0.linux-amd64.tar.gz /opt/monitor/prometheus
[root@zabbix ~]# cd /opt/monitor/prometheus-2.25.0.linux-amd64/
[root@zabbix prometheus-2.25.0.linux-amd64]# ls
console_libraries consoles LICENSE NOTICE prometheus prometheus.yml promtool
[root@zabbix monitor]# mv prometheus-2.25.0.linux-amd64/ prometheus/

[root@zabbix monitor]# cd /usr/lib/systemd/system/
[root@zabbix monitor]# cat prometheus.service
[Unit]
Description=prometheus
[Service]
ExecStart=/opt/monitor/prometheus/prometheus --config.file=/opt/monitor/prometheus/prometheus.yml
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target

[root@zabbix system]#systemctl restart prometheus
[root@zabbix system]# ps -ef | grep prometheus
root 75418 1 0 08:45 ? 00:00:00 /opt/monitor/prometheus/prometheus --config.file=/opt/monitor/prometheus/prometheus.yml
root 78206 66919 0 08:49 pts/2 00:00:00 grep --color=auto prometheus
[root@zabbix system]# ss -anptu | grep prometheus
tcp LISTEN 0 128 :::9090 :::* users:(("prometheus",pid=75418,fd=8))
tcp ESTAB 0 0 ::1:42484 ::1:9090 users:(("prometheus",pid=75418,fd=3))
tcp ESTAB 0 0 ::1:9090 ::1:42484 users:(("prometheus",pid=75418,fd=7))
访问 ip:9090

部署grafana可视化页面
[root@zabbix ~]# tar -xf grafana-7.4.5.linux-amd64.tar.gz -C /opt/monitor/
[root@zabbix ~]# cd /opt/monitor/
[root@zabbix monitor]# mv grafana-7.4.5/ grafana/
[root@zabbix system]# cd /usr/lib/systemd/system
[root@zabbix system]# cat grafana.service
[Unit]
Description=grafana
[Service]
ExecStart=/opt/monitor/grafana/bin/grafana-server -homepath=/opt/monitor/grafana
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target


[root@zabbix ~]# systemctl restart grafana
[root@zabbix ~]# ps -ef | grep grafana
root 82018 1 6 08:55 ? 00:00:00 /opt/monitor/grafana/bin/grafana-server -homepath=/opt/monitor/grafana
root 82165 66919 0 08:55 pts/2 00:00:00 grep --color=auto grafana
[root@zabbix ~]# ss -anptu | grep grafana
tcp ESTAB 0 31 192.168.0.60:50536 185.199.109.133:443 users:(("grafana-server",pid=82018,fd=10))
tcp ESTAB 0 0 192.168.0.60:52324 34.120.177.193:443 users:(("grafana-server",pid=82018,fd=9))
tcp LISTEN 0 128 :::3000 :::* users:(("grafana-server",pid=82018,fd=8))
访问: ip:3000

访问不了清空防火墙 iptables -F

prometheus监控

标签:监控   tor   可视化   not   start   monit   iptables   sys   RoCE   

原文地址:https://www.cnblogs.com/heping0312/p/14615804.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!