centos7下安装配置prometheus

prometheus官网:https://prometheus.io/download/

搭建环境参考:https://blog.csdn.net/baidu_36943075/article/details/91829364

一、安装配置prometheus 参考:https://www.jianshu.com/p/c9b46bc18624

启动:systemctl start prometheus

查看状态:systemctl status prometheus

二、安装go环境

 查看版本go version

三、启动node_exporter

 nohup ./node_exporter &  #启动node_exporter并后台运行

 ps -ef | grep node_exporter  #检查进程的方式查看是否运行成功

四、安装mysql

systemctl start mysqld #启动

五、安装mysql_exporter

nohup ./mysqld_exporter --config.my-cnf=.my.cnf &  #后台启动

ps -ef | grep mysqld_exporter #查看是否运行成功

六、安装redis_exporter

nohup ./redis_exporter exporter redis://localhost:16379 &  #后台启动

ps -ef | grep redis_exporter

 七、安装grafana

参考:https://grafana.com/grafana/download

systemctl start grafana-server #启动

八、Altermanager监控告警

  1.添加邮件配置:vim /etc/grafana/grafana.ini

  重启grafana服务:systemctl restart grafana-server

2. 配置grafana邮件

 3.安装alertmanager

alertmanager配置邮箱 vim alertmanager.yml

后台启动: nohup ./alertmanager --config.file=alertmanager.yml &

九、修改prometheus配置文件

1.添加rule_files; 2.新增rule_files文件(直接复制别人的样例);

3.重启prometheus: nohup ./prometheus --config.file=prometheus.yml &

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值