prometheus+grafana搭建监控服务
前言
之前使用过InfluxDB+Grafana的方案,主动push监控数据,现在使用Prometheus pull数据的方案,相比前一种方案,现在这种在部署上更加方便。推荐。
Grafana
安装
可以参考另外一篇文章: InfluxDB和Grafana搭建监控服务
Linux服务器安装
官网选择对应的版本下载并安装。
启动grafana
1
2
3
4
5
6[root@cxm ~]#systemctl daemon-reload
[root@cxm ~]#systemctl start grafana-server
[root@cxm ~]#systemctl stop grafana-server
[root@cxm ~]#systemctl restart grafana-server
[root@cxm ~]#systemctl status grafana-server
[root@cxm ~]#systemctl enable grafana-server开放3000端口
1
2
3[root@cxm ~]#firewall-cmd --list-ports
[root@cxm ~]#firewall-cmd --add-port=3000/tcp --zone=public --permanent
[root@cxm ~]#firewall-cmd --reload或者直接关闭防火墙
Prometheus
安装Prometheus
安装node_exporter
用来上报机器性能数据,在prometheus的官网有。
按照文章中的方式以systemctl 启动。
详细参考文章:
https://mp.weixin.qq.com/s/ZXlBPHGcWeYh2hjBzacc3A
https://blog.csdn.net/shenyuanhaojie/article/details/121775976
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 张嘎!
评论
GitalkValine