1.6 利用夜莺扩展能力打造全方位监控系统
左图是2013年的一个新闻,讲 Google宕机的影响。2020年也出现 过aws大规模宕机的情况,影响不 止是55万美元,直接影响大半个 互联网! 2018年有美国调研机构指出,如 果服务器宕机1分钟,银行会损失 27万美元,制造业会损失42万美 元 美团故障?滴滴故障?腾讯故障? 运维监控需求来源 01.监控的原始需求来自业务稳定性 如何减少服务停摆导致的经济损失?尽快发 Serializer 夜莺数据采集 06. Serializer 夜莺数据采集 07. Forwarder 夜莺设计实现 Server 数据处理 第五部分 夜莺Server数据处理 01. 服务器 02. API 夜莺Server数据处理 03. AlarmRule Control 夜莺Server数据处理 04. CollectRule Control 夜莺Server数据处理0 码力 | 40 页 | 3.85 MB | 1 年前3PromQL 从入门到精通
,是否有巨大变化,那怎么 才能获取历史数据呢?可以使用 offset 关键字。 offset 后面跟一个时间段,比如 5m、1d、7d、1w,offset 要紧跟查询选择器,比如: sum(http_requests_total{method="GET"} offset 1d) 运算符 PromQL 支持基本的算术运算符和比较运算符,可以对不同的即时向量做运算,这为监控系统 带来了巨大 method_code:http_errors:rate5m{method="get", code="500"} 24 method_code:http_errors:rate5m{method="get", code="404"} 30 method_code:http_errors:rate5m{method="put", code="501"} 3 method_code:http_error 3 4 5 method_code:http_errors:rate5m{method="post", code="404"} 21 method:http_requests:rate5m{method="get"} 600 method:http_requests:rate5m{method="del"} 34 method:http_requests:rate5m{method="post"}0 码力 | 16 页 | 2.77 MB | 1 年前3OpenMetrics - Standing on the shoulders of Titans
OpenMetrics Outro Looks Prometheus http_requests_total{env=" prod" ,method=" post" ,code=" 200" } 1027 http_requests_total{env=" prod" ,method=" post" ,code=" 400" } 3 http_requests_total{env=" prod" ,method=" method=" post" ,code=" 500" } 12 http_requests_total{env=" prod" ,method=" get" ,code=" 200" } 20 http_requests_total{env=" test" ,method=" post" ,code=" 200" } 372 http_requests_total{env=" test" ,method=" OpenMetrics Outro Looks OpenMetrics http_requests_total{env=" prod" ,method=" post" ,code=" 200" } 1027 http_requests_total{env=" prod" ,method=" post" ,code=" 400" } 3 http_requests_total{env=" prod" ,method="0 码力 | 21 页 | 84.83 KB | 1 年前3Intro to Prometheus - With a dash of operations & observability
pull-based system Black-box monitoring: Looking at a service from the outside (Does the server answer to HTTP requests?) White-box monitoring: Instrumention code from the inside (How much time does this subroutine observability Outro Exposition format http_requests_total{env=" prod" ,method=" post" ,code=" 200" } 1027 http_requests_total{env=" prod" ,method=" post" ,code=" 400" } 3 http_requests_total{env=" prod" ,method=" method=" post" ,code=" 500" } 12 http_requests_total{env=" prod" ,method=" get" ,code=" 200" } 20 http_requests_total{env=" test" ,method=" post" ,code=" 200" } 372 http_requests_total{env=" test" ,method="0 码力 | 19 页 | 63.73 KB | 1 年前3B站统⼀监控系统的设计,演进 与实践分享
完整的监控体系 ✦ 科学的告警策略略 ✦ 统⼀一的告警中⼼心 完整的监控体系 • 虚拟机 • 物理理设备 • 容器器 • 专线质量量 • 机房出⼝口质量量 • 交换设备 • http • tcp • ping 基础层 应⽤用层 • cache资源 • db资源 • mq资源 • lb资源 • es资源 • 分布式⽂文件 • 进程监控 业务层 获取监控数据 推送告警 1. 降低编写规则的成本 2. 降低多idc维护成本 规则管理理⻚页⾯面 例例⼦子 - 业务监控 稿件 账号 Feed PAAS托管 服务树 container http server sdk 注册 获取target 采集数据 吞吐量量 响应时间 错误率 饱和度 熔断 限流 投稿数量量 订单数据 在线⼈人数 … ⻩黄⾦金金指标 业务指标0 码力 | 34 页 | 650.25 KB | 1 年前3告警OnCall事件中心建设方法白皮书
情再 高,也不如机器来得快,如果有些告警能够直接关联自动化处理逻辑,无疑可以大大增加事件闭环率。 告警自动处理 很多监控系统都可以配置 Webhook,当告警触发之后自动回调某个 HTTP 接口,来串联一些自动化的 逻辑,让告警事件无人值守自动处理。比如某个机房的某个服务挂掉了,Webhook 的逻辑是自动调用切 流的接口,把服务流量切走,这样来达到止损的目的。 告警0 码力 | 23 页 | 1.75 MB | 1 年前3
共 6 条
- 1