centos安装Prometheus
发布日期:2021-06-30 20:51:29
浏览次数:2
分类:技术文章
本文共 1662 字,大约阅读时间需要 5 分钟。
本文转载运维@小兵 原文地址:
https://blog.csdn.net/anqixiang/article/details/104166077一、简介
1架构图
2、核心概念二、安装配置和使用
下载二进制包并解压
官方地址:https://github.com/prometheus/prometheus/tags **百度网盘 :**链接:https://pan.baidu.com/s/1og-EH5nxG9xX6ndVI-Gogg 提取码:q5intar xvf prometheus-2.14.0.linux-amd64.tar.gzmv prometheus-2.14.0.linux-amd64 /usr/local/bin/prometheus
配置systemd管理
cat > /usr/lib/systemd/system/prometheus.service << EOF[Unit]Description=https://prometheus.io[Service]Restart=on-failureExecStart=/usr/local/bin/prometheus/prometheus --config.file=/usr/local/bin/prometheus/prometheus.yml[Install]WantedBy=multi-user.targetEOF
systemctl daemon-reload systemctl start prometheus systemctl enable prometheus
2.web访问(默认监控自身)
访问地址:http://ip:9090 3.查看当前抓取的数据http://IP:9090/metrics
4.查找数据,示例 访问地址:http://ip:9090 可以看到统计的数据 图形化展示三、docker方式部署(没试验出来呢,卡在了02.拉取镜像)
1安装docker
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repoyum install docker-ce-18.06.1.ce-3.el7 -ysystemctl enable dockersystemctl start dockerdocker -v
2拉取镜像启动容器
配置国内镜像源,提高下载速度:https://blog.csdn.net/anqixiang/article/details/96772479docker run -d --name prometheus --restart=always -p 9090:9090 -v /usr/local/bin/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus
访问http://ip:9090
四、配置文件讲解
1、global全局配置scrape_interval 采集数据周期,默认1分钟scrape_timeout 采集超时时间,默认10秒evaluation_interval 告警评估周期,默认1分钟external_labels 外部标签,很少用
2、rule_files指定监控告警规则
参考:https://www.jianshu.com/p/fb5c82de935dmetrics_path 默认为/metricshonor_labels 默认标签值,默认不覆盖scheme: 请求的协议,默认httpparams: http携带的参数basic_auth 基础认证
4.alerting配置告警 5.remote_write远程存储写 6.remote_read远程存储读
转载地址:https://liushiya.blog.csdn.net/article/details/104349203 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
做的很好,不错不错
[***.243.131.199]2024年04月27日 09时17分34秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
HDU-4300 Clairewd’s message + 4333(扩展KMP)
2021-07-03
HDU 1592 Half of and a Half(高精度)
2021-07-03
POJ-3304 Segments(计算几何)
2021-07-03
UVA-11538 Chess Queen(数学)
2021-07-03
UVA-11401 Triangle Counting(数学优化)
2021-07-03
Codeforces Round #369 (Div. 2)
2021-07-03
UVA 11426 GCD - Extreme (II)(欧拉函数)
2021-07-03
HDU-2838 Cow Sorting(树状数组)
2021-07-03
POJ-2299 Ultra-QuickSort(树状数组)(离散化)
2021-07-03
基于SSM的兼职论坛系统的设计与实现
2021-07-03
基于java的图书管理系统的设计与实现
2021-07-03
基于java的SSM框架理财管理系统的设计与实现
2021-07-03
基于java的ssm框架就业信息管理系统的设计
2021-07-03
基于java的ssm框架的旅游网站设计与实现
2021-07-03
基于java的SSM框架的流浪猫救助网站的设计与实现
2021-07-03
基于java的SSM框架的教务关系系统的设计与实现
2021-07-03
别再问我什么是A/B测试了!
2021-07-03
如何用同期群分析模型提升留存?(Tableau实战)
2021-07-03
爱了,吹爆这个高颜值的流程图工具!
2021-07-03