网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
1、清华源下载
[root@ceph-grafana-prometheus ~]# wget https://mirrors.tuna.tsinghua.edu.cn/grafana/yum/rpm/grafana-6.7.3-1.x86\_64.rpm
2.安装grafana
rpm -ivh grafana-6.7.3-1.x86_64.rpm
或
yum localinstall grafana-6.7.3-1.x86_64.rpm
3.启动grafana并设为开机自启
systemctl start grafana-server.service
systemctl enable grafana-server.service
#grafana的默认端口为3000
二、安装prometheus
#1、下载安装包,下载地址
wget https://github.com/prometheus/prometheus/releases/download/v2.18.0/prometheus-2.18.0.linux-amd64.tar.gz
#2、解压压缩包
tar xf prometheus-2.14.0.linux-amd64.tar.gz
#3、将解压后的目录改名
mv prometheus-2.18.0.linux-amd64 /opt/prometheus
#4、查看prometheus版本
cd /opt/prometheus/
./prometheus --version
prometheus, version 2.18.0
#5、配置系统服务启动
vim /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus Monitoring System
Documentation=Prometheus Monitoring System
[Service]
ExecStart=/opt/prometheus/prometheus \
--config.file /opt/prometheus/prometheus.yml \
--web.listen-address=:9090
[Install]
WantedBy=multi-user.target
#6、加载系统服务
systemctl daemon-reload
#7、启动服务和添加开机自启动
systemctl restart prometheus
systemctl enable prometheus
#8、访问
http://192.168.0.5:9090
三、ceph mgr prometheus插件配置
在cephnode01上配置
#启动prometheus模块
ceph mgr module enable prometheus
#检查端口
netstat -nltp | grep mgr
ceph -s (mgr在cephnode03上)
#测试返回值
curl 192.168.0.8:9283/metrics
#访问
http://192.168.0.8:9283/metrics
四、配置prometheus
1、在 scrape_configs: 配置项下添加
#每个job\_name要分开
vim prometheus.yml
- job_name: 'ceph\_cluster'
honor_labels: true
scrape_interval: 5s
static_configs:
- targets: ['192.168.0.8:9283']
labels:
instance: ceph
2、重启prometheus服务
systemctl restart prometheus
3、检查prometheus服务器中是否添加成功
浏览器-》 http://x.x.x.x:9090 -》status -》Targets
五、配置grafana
1、浏览器登录 grafana 管理界面
http://192.168.0.5:3000/
2、添加data sources,点击configuration–》data sources
3、添加dashboard,点击HOME–》find dashboard on grafana.com
4、搜索ceph的dashboard
5、点击HOME–》Import dashboard, 选择合适的dashboard,记录编号
先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前在阿里
深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年最新Linux运维全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上运维知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
495683)]
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上运维知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新